Home  >  Article  >  Operation and Maintenance  >  What should I do if the ls command cannot be found in centos?

What should I do if the ls command cannot be found in centos?

WBOY
WBOYOriginal
2022-04-14 17:21:134193browse

In centos, you can use the export command to solve the problem that the ls command cannot be found. The reason for this problem is that the environment variable PATH is modified. The function of the export command is to set or display the environment variable. The syntax is "export PATH=/bin:/usr/bin:$PATH”.

What should I do if the ls command cannot be found in centos?

The operating environment of this article: centos 7 system, Dell G3 computer.

What to do if the ls command cannot be found in centos

The problem of failing to execute the ls command in CentOS7. As shown in the figure:

What should I do if the ls command cannot be found in centos?

When executing the ls command, the command cannot be found. The reason is that the environment variable PATH has been modified.

Solution:

Execute

export PATH=/bin:/usr/bin:$PATH

What should I do if the ls command cannot be found in centos?

Then ls

What should I do if the ls command cannot be found in centos?

What should I do if the ls command cannot be found in centos?

##The problem is solved!

Recommended tutorial: "

centos tutorial"

The above is the detailed content of What should I do if the ls command cannot be found in centos?. 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
Previous article:What is virbr0 in centos7Next article:What is virbr0 in centos7