Terminal commands can not be found OSX

心不动则不痛 提交于 2019-12-20 05:14:12

问题


A majority of terminal commands don't work, for example .

ls sudo vi

with the error -bash: ls: command not found my path is echo $PATH “/Users/username/usr/local/bin I get the feeling that should not be there but not sure how edit it.

What should the path be and how do I get the path to stay the same?


回答1:


You need to add more paths to your $PATH variable. Try running whereis ls and check where is the binary of the command.

You can add more paths like this: export PATH=$PATH:NEW_PATH



来源:https://stackoverflow.com/questions/39568421/terminal-commands-can-not-be-found-osx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!