http://blog.csdn.net/houmou/article/details/51020709 Problem Description
http://blog.csdn.net/houmou/article/details/51020709
Recently, a new SSH client, found a lot of commands can not be used such as: LS, VI, CAT, ETC., hint:
-bash:xx:no such file or Directory12
But in other not closed SSH terminal can be used, speculation is the problem of/etc/profile file, the display $path after the discovery is not correct; switch root permission to modify the profile file, found that VI command can not be used, finally Baidu to the solution.
Workaround
Executing the following statement in the SSH terminal allows the environment variables in this session terminal to function
Export Path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin12
Then modify the/etc/profile file, and the system returns to normal after re-source
Postscript
Later found because someone modified the profile file, used $PATH=<newpath>
, and did not use the ":" Stitching the original $PATH
, causing the path lost important environment variables
The CD can still be used in the event of a problem, the <Tab>
key can also play the role of LS
Workaround for Linux basic commands not available