MacOS下出現-bash: 命令: command not found的解決方法
1.在命令行輸入:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
2.進入當前用戶的home目錄:
cd ~/
3.創建bash_profile執行命令:
touch .bash_profile
4.打開並編輯bash_profile 執行命令:
open .bash_profile
5. 在打開的記事本中會顯示之前配置過的path, 進行保存 全選: command+s 或者不放心的話 選中記事本 文件-保存 保存之后沒提示 直接關掉就可以。
6. 此時在命令行中輸入更新命令(命令行一直不要關):
source .bash_profile