Home > Article > Operation and Maintenance > What should I do if CentOS prompts that the command cannot be found?
What should I do if CentOS prompts that the command cannot be found?
1. If a certain command cannot be found, it means that the corresponding software package is not installed. Use Just run yum install fb9567f3fd194d4da758ca91c4914633 to install it.
2. If all the commands cannot be found, the system environment variable PATH is wrong. The specific solution is as follows:
1. First check the value of the PATH variable
echo $PATH
Check whether the path contains:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin. If not, you need to add it manually;
(Recommended learning: Website Construction Tutorial)
2. Use the root user to modify the profile (environment configuration) file: (all users)
/usr/bin/vi /etc/profile
Add: export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
Save and exit.
3. Modify the .bashrc file: (individual user)
/usr/bin/vi ~/.bashrc
Add: export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/sbin:/ bin:/usr/sbin:/usr/bin
Save and exit.
4. Use source to make the configuration take effect
source /etc/profile source ~/.bashrc
Through the above operations, you will no longer be prompted that the command cannot be found.
This article comes from the PHP Chinese website, CentOS usage tutorial column, please pay attention to this column for more related tutorials!
The above is the detailed content of What should I do if CentOS prompts that the command cannot be found?. For more information, please follow other related articles on the PHP Chinese website!