Home > Operation and Maintenance > CentOS > 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
Release: 2022-04-14 17:21:13
Original
4235 people have browsed it

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

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!

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