centos找不到环境变量 -bash: ls: command not found
#在系统中输入命令,报如下错误:
[root@a1 work]# ll
-bash: ls: command not found
#临时解决办法:
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
o
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
#永久解决办法:
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
or
echo "export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/roobo/server/mysql/bin:/root" >>/etc/profile
#使环境变量生效
source /etc/profile