linux报错:ls command not found

这是因为在改环境变量的时候没有配置正确的原因,需要在命令行写:

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

此时再试一下ls,可以正常执行,但是下次连接的时候可能失效,所以要将这句话写到/etc/profile文件中

然后让这个配置生效

source /etc/profile

猜你喜欢

转载自www.cnblogs.com/saifei1125/p/12071286.html