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

The centos system cannot find the command

王林
Release: 2020-03-17 11:42:05
Original
4189 people have browsed it

The centos system cannot find the command

Problem:

Any command entered shows

bash: xxxx: command not found...
Copy after login

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
Copy after login
Copy after login

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
Copy after login

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
Copy after login
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template