My csdn blog address: Http://blog.csdn.net/caicongyang
Bloggers have previously modified the/etc/profile configuration file method, causing the bash command to be unavailable
The execution of the LS command results in the following:
[plain] view plain copy
- -bash:ls:command is not found
But fortunately the blogger backed up the/etc/profile before, so I restored the profile back to SSH, but now I need to execute
[plain] view plain copy
- # Source/etc/profile
Get the config file back into effect, and then the unfortunate thing is
[plain] view plain copy
- -bash:id:command is not found
Found source command no longer recognized!
After the degree of Niang mention point, we can use the command to re-path;
[plain] view plain copy
- # Export Path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
After executing the above command, you can re-execute the source/etc/profile command to get your profile to take effect
If unfortunately your profile configuration file is not backed up, you can add the command address in the case where the VI command is not available directly
[plain] view plain copy
- #/bin/vi/etc/profile
So you can use the VI command to modify it!
Linux Modify/etc/profile Configuration Error command is not found self-rescue method