亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如下情況,還請大家幫忙看看怎樣恢復???

如下情況,還請大家幫忙看看怎樣恢復???

iOS
四季花海 2023-04-19 18:14:36
將原先的bash_profile中的PATH環境變量中的$PATH刪除了,然后執行source ~/.bash_profile之后就出現了錯誤,每次打開Terminal都顯示:-bash: grep: command not found-bash: grep: command not foundenv: bash: No such file or directoryenv: bash: No such file or directoryenv: bash: No such file or directoryenv: bash: No such file or directoryenv: bash: No such file or directory-bash: grep: command not found-bash: cat: command not found-bash: grep: command not found-bash: grep: command not found-bash: grep: command not found-bash: grep: command not found所有的命令都不能正常執行了,類似:top、ifconfig都會顯示:-bash: top: command not found
查看完整描述

2 回答

?
楊魅力

TA貢獻1811條經驗 獲得超6個贊

確定你的編輯器的目錄位置,比如為/usr/bin/vim, 然后輸入命令時用全路徑: /usr/bin/vim ~/.bash_profile 打開上面的文件后,至少加上

PATH=/bin:/sbin/ 
export PATH

估計這樣就可以恢復原來的樣子了


查看完整回答
反對 回復 2023-04-21
?
躍然一笑

TA貢獻1826條經驗 獲得超6個贊

  1. 打開Terminal

  2. 重置$PATH
    $ export PATH=/bin:/usr/bin:/usr/local/bin

  3. 修復$PATH


查看完整回答
反對 回復 2023-04-21
  • 2 回答
  • 0 關注
  • 190 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號