找不到终端命令OSX

编程入门 行业动态 更新时间:2024-10-11 05:30:07
本文介绍了找不到终端命令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

本文发布于:2023-07-06 07:43:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1047452.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:找不到   终端   命令   OSX

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!