如何解决“bash:ls:找不到命令”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18333658/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to solve "bash: ls: command not found"
提问by prilia
I did something wrong with PATH, so currently if I type ls
command I get:
我在PATH 上做错了,所以目前如果我输入ls
命令,我会得到:
bash: ls: command not found
How can I solve it?
我该如何解决?
回答by Ignacio Vazquez-Abrams
Restore $PATH
. The easiest way to do this is to close the current shell and open a new one (assuming you didn't futz with the shell startup files and this is why it's broken).
恢复$PATH
。最简单的方法是关闭当前的 shell 并打开一个新的 shell(假设你没有对 shell 启动文件感到困惑,这就是它损坏的原因)。