ls -bash: ls: command not found

ls -bash: ls: command not found

原因:在设置环境变量时,编辑profile文件没有写正确,导致在命令行下 ls等命令不能够识别。

解决方案:
在/etc/profile最后增加下面的内容

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

source /etc/profile

这样就可以了

发布了197 篇原创文章 · 获赞 30 · 访问量 8万+

猜你喜欢

转载自blog.csdn.net/Rio520/article/details/104369629
ls
今日推荐