Command is not found self-help method, etcprofile
My CSDN blog: http://blog.csdn.net/caicongyang
The bash command cannot be used after the blogger modifies the/etc/profile configuration file method.
The result of executing the ls command is as follows:
-bash: ls:command is not found
Fortunately, the blogger backed up the/etc/profile, so I restored the profile through SSH, but now I need to execute
# source /etc/profile
Make the configuration file take effect again. Unfortunately
-bash: id:command is not found
The source command is unknown!
After being mentioned by Du Niang, we can use the command to re-use the PATH;
# export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
After executing the preceding command, you can re-execute the source/etc/profile command to make your configuration file take effect.
If your profile configuration file is not backed up, you can add the command address before vi if you cannot use the vi command directly.
#/bin/vi /etc/profile
In this way, you can use the vi command to modify it!
My CSDN blog: http://blog.csdn.net/caicongyang
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.