歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> The command could not be located because '/usr/bin' is not included解決

The command could not be located because '/usr/bin' is not included解決

日期:2017/3/1 16:30:38   编辑:關於Linux
The command could not be located because '/usr/bin' is not included解決 用的是Ubuntu12.04。 為了把adb命令設置到環境變量中,我在~/.bashrc文件中加入了如下命令: export PATH=/home/develop/android-sdks/platform-tools/ 結果悲劇了.輸入常用命令ls,cd ,,,都不行。連vi也不行。一律報錯。The command could not be located because '/usr/bin' is not included in the PATH environment variable.clear: command not found. 看半天才知道忘加系統PATH的路徑,所以系統工具命令都找不到。 可怎麼把配置文件改過來呢,折騰了半天,發現很簡單。直接用系統工具的全路徑編輯配置文件。我用的是sudo vi /usr/bin/vi ~/.bashrc. 然後加入命令 export PATH=/home/develop/android-sdks/platform-tools/:$PATH。再重啟終端就好了。 學到了兩點: 1.系統命令找不到時,通常是路徑不對,直接在命令行用全路徑即可; 2.在設置環境變量時,尤其是linux系統中,你加入自己的環境變量,可還要附帶上之前的變量。如最後加上:$PATH
Copyright © Linux教程網 All Rights Reserved