执行ls、ll、vim、jps、reboot 等命令时出现 command not found

 linux 下执行类似与 ls、ll、vimjpsreboot 等命令时出现 command not found,并且执行 source /etc/profile 出现:

bash: id: command not found

bash: tty: command not found

 

是因为 /etc/profile 下配置环境变量时出现了问题导致了环境变量失效。

解决方案:使用下面的命令修改 /etc/profile 文件,然后断开 linux 连接,重新连接即可。

/bin/vi /etc/profile

猜你喜欢

转载自www.cnblogs.com/lyx1017616891/p/9580602.html