Home >Operation and Maintenance >CentOS >The centos system cannot find the command
Problem:
Any command entered shows
bash: xxxx: command not found...
Solution:
One: Directly in linux Enter the following on the command line interface and press Enter (to import environment variables and the storage addresses of common shell commands):
(Recommended tutorial: centos usage tutorial)
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
Second: If all commands in the system cannot be used, you can also use the absolute command vi to open profile
/bin/vi /etc/profile
Add the environment variable address to the system configuration file
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
Related videos Tutorial sharing: linux video tutorial
The above is the detailed content of The centos system cannot find the command. For more information, please follow other related articles on the PHP Chinese website!