Solution to Linux not supporting all commands

Solution to Linux not supporting all commands

What should I do if Linux does not support all commands? Solve the problem that all Linux commands cannot be used

This problem indicates that there is a problem with your /etc/profile configuration, usually because there is a problem with the path configuration. Eliminate the errors in the added content, then restart a new window and execute source /etc/profile to solve the problem.

When all commands are disabled, vi becomes useless.

At this time, you need to use the absolute path of the shell command to call the command.

# Edit the profile file /usr/bin/vim /etc/profile

Then execute in a new window

source /etc/profile

All linux commands cannot be used

When configuring nginx, all linux commands cannot be used after the error export

This problem occurs because the system's 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. There are two ways to solve it.

First: Enter the following directly in the Linux command line interface and press Enter (import environment variables and the storage address of common shell commands):

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

Second: If all system commands cannot be used, you can also use the absolute command vi to open the profile
/bin/vi /etc/profile

Add the environment variable address in the system configuration file

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

The above is the result of the editor combining multiple articles. I hope it can help everyone.

You may also be interested in:
  • Linux series of commonly used operation and maintenance commands (summary)
  • Detailed explanation of Linux lsof command usage
  • Linux common basic commands and usage
  • Linux traceroute command usage detailed explanation
  • Detailed explanation of Linux file transfer commands rz and sz
  • Detailed explanation of awk command in Linux

<<:  Solution to the Multiple primary key defined error in MySQL

>>:  Use Angular CDK to implement a Service pop-up Toast component function

Recommend

In-depth analysis of HTML semantics and its related front-end frameworks

About semantics Semantics is the study of the rel...

Docker build PHP environment tutorial detailed explanation

Docker installation Use the official installation...

MySQL 5.7.25 installation and configuration method graphic tutorial

There are two types of MySQL installation files, ...

Implementation example of nginx access control

About Nginx, a high-performance, lightweight web ...

Example of how to implement local fuzzy search function in front-end JavaScript

Table of contents 1. Project Prospects 2. Knowled...

Let's learn about the MySQL storage engine

Table of contents Preface 1. MySQL main storage e...

5 JavaScript Ways to Flatten Arrays

Table of contents 1. Concept of array flattening ...

Detailed explanation of the usage of two types of temporary tables in MySQL

External temporary tables A temporary table creat...

A brief discussion on the role of HTML empty links

Empty link: That is, there is no link with a targ...

CentOS7 installation zabbix 4.0 tutorial (illustration and text)

Disable SeLinux setenforce 0 Permanently closed: ...

Monitor the size change of a DOM element through iframe

A common problem encountered during the developme...

A brief introduction to the usage of decimal type in MySQL

The floating-point types supported in MySQL are F...