当使用source ./.bashrc,而出现大量命令无法找到时,如:
Command ‘lesspipe’ is available in the following places
- /bin/lesspipe
- /usr/bin/lesspipe
The command could not be located because ‘/bin:/usr/bin’ is not included in the PATH environment variable.
lesspipe: command not found
Command ‘dircolors’ is available in ‘/usr/bin/dircolors’
The command could not be located because ‘/usr/bin’ is not included in the PATH environment variable.
dircolors: command not found
Command ‘ls’ is available in ‘/bin/ls’
The command could not be located because ‘/bin’ is not included in the PATH environment variable.
ls: command not found
在终端输入:
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
1
可解决问题。