找不到终端命令OSX [英] Terminal commands can not be found OSX

查看:74
本文介绍了找不到终端命令OSX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,大多数终端命令不起作用.

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

ls sudo vi

ls sudo vi

出现错误-bash: ls: command not found,我的路径是echo $PATH /Users/username/usr/local/bin,我感到不应该存在,但不确定如何进行编辑.

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?

推荐答案

您需要向$ PATH变量添加更多路径.尝试运行whereis ls并检查命令的二进制文件在哪里.

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

您可以添加更多这样的路径:export PATH=$PATH:NEW_PATH

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

这篇关于找不到终端命令OSX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆