MacOS输入基本命令提示command not found。

或不论输入什么都出现no such file or directory,可能是配置环境变量的时候配置错误。

可以尝试通过以下方案解决。

打开终端,输入命令:

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

在~/.bash_profile中进行修改

vim ~/.bash_profile

查看是否有一下内容,如果没有则添加进去:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

添加完毕之后保存并退出,输入命令使配置生效:

source ~/.bash_profile

相关文章:

  • 2022-12-23
  • 2021-09-27
  • 2022-01-24
  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
  • 2021-09-12
猜你喜欢
  • 2021-07-17
  • 2022-12-23
  • 2022-02-14
  • 2022-12-23
  • 2021-05-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案