Linux system commands cannot be used

王林
Release: 2020-01-14 09:34:30
Original
3138 people have browsed it

Linux system commands cannot be used

This problem occurs because the system environment variables are not configured correctly. There are many reasons for this, such as system upgrades, improper operations, etc., which cause the environment variables to be overwritten and modified. Solve There are two ways.

Method 1: Enter the following directly on the Linux command line interface, and then press Enter (import environment variables and storage addresses of common shell commands):

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
Copy after login
Copy after login

Recommended learning video tutorial: linux video tutorial

Method 2: 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

and add it to the system configuration file Environment variable address

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
Copy after login
Copy after login

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of Linux system commands cannot be used. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!