Home > Article > Operation and Maintenance > What should I do if the ls command cannot be found in centos?
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”.
The operating environment of this article: centos 7 system, Dell G3 computer.
The problem of failing to execute the ls command in CentOS7. As shown in the figure:
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
Then ls
##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!