Home >Operation and Maintenance >CentOS >The centos system cannot find the command

The centos system cannot find the command

王林
王林Original
2020-03-17 11:42:054143browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn