今天修改/etc/profile下的环境变量,执行过source /etc/profile之后: [root@localhost ]# vim /etc/profile bash: vim: command not found
找不到命令了
解决方法:
[root@localhost ]# export PATH=/usr/bin:/usr/sbin:/bin:/sbin
[root@localhost ]# vim /etc/profile
[root@localhost ]# source /etc/profile
操作需谨慎啊!!!