linux命令用不了

执行完source /etc/profile 之后,发现所有的命令都用不了了,最后发现是因为我把 /etc/profile 文件中的PATH变量的值得末尾那个 $PATH 给去掉了,导致系统的路径找不到了;

这时候该回去就好了,使用 绝对路径去修改  /usr/bin/vim  /etc/profile   就是vim /etc/profile 的绝对路径版,在PATH变量末尾添加上 $PATH,保存退出,然后重新打开终端,执行source /etc/profile 就解决问题了。

 ps:遇到的坑,记录一下。

猜你喜欢

转载自blog.csdn.net/charberming/article/details/81137319
今日推荐