MacPro终端出现bash: touch: command not found

这个主要是bash_profile文件有问题,有可能编辑的时候出错了

我们可以通过以下方法来恢复

在终端输入:

export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin  

然后切换到用户home目录下:

cd ~/

创建bash_profile文件:

touch .bash_profile

打开bash_profile:

open .bash_profile

现在你可以看到之前配置的bash_profile文件,检查是否有错误,如果检查不出,就备份好,只保留系统的,一条一条测试

重新载入配置:

source .bash_profile
posted @ 2017-08-18 17:57  代码无涯  阅读(1723)  评论(0编辑  收藏  举报