ls -bash: ls: command not found

今天在Centos6.5_64上不当心设置错了环境变量,致使ls等经常使用命令都没法使用了。html


ls -bash: ls: command not foundvim


[root@lovebuy247 bin]# source  /root/.bash_profile bash

[root@lovebuy247 bin]# llide

-bash: ls: command not found命令行

[root@lovebuy247 bin]# lshtm

-bash: ls: command not foundblog

[root@lovebuy247 bin]# llit

-bash: ls: command not foundclass

[root@lovebuy247 bin]# vim /root/.bash_profile 变量

-bash: vim: command not found

[root@lovebuy247 bin]# export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

[root@lovebuy247 bin]# cd /root/

[root@lovebuy247 ~]# ls


缘由:在设置环境变量时,编辑profile文件没有写正确,致使在命令行下 ls等命令不可以识别。


解决方案:

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

 

 缘由:在设置环境变量时,编辑profile文件没有写正确,致使在命令行下 ls等命令不可以识别。


解决方案:

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

 

 参考网址:

 http://blog.sina.com.cn/s/blog_69bcf3bb01014lvn.html

相关文章
相关标签/搜索