This is because the right reasons at the time of changing the environment variable is not configured, you need to write in the command line:
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
At this time, try again ls, can perform normal, but when the next connection might fail, so you want to write the phrase / etc / profile file
Then let the configuration to take effect
source /etc/profile