Today, when we opened the centos system, all the commands were suddenly unavailable, such as shutdownrebootsshscp. All show commandnotfound. Puzzling !!! A few days ago. Find the configuration file/root/. bash_profile and modify it: 1.
Today, when you open the centos system, all the commands suddenly fail to work normally, such as shutdown reboot ssh scp. Command not found is displayed.
Puzzling !!! A few days ago.
Find the configuration file/root/. bash_profile and modify it:
1. enter the root path.
2. the. bash_profile file is hidden and displayed with the command ls-la.
3. modify vi. bash_profile as follows:
#. Bash_profile
# Get the aliases and functions
If [-f ~ /. Bashrc]; then
.~ /. Bashrc
Fi
# User specific environment and startup programs
PATH = $ PATH: $ HOME/bin:/sbin:/usr/bin:/usr/sbin
Export PATH
Unset USERNAME
4. save and exit
5. directly shut down and restart (because the shutdown command is executed. So shut down directly), solve the problem after restart!