解決Linux所有命令不能使用的問題
出現這個問題說明你的 /etc/profile 配置出現了問題,一般是因為path配置出現了問題。排除添加內容中的錯誤,然后重啟一個新窗口執行執行 source /etc/profile即可解決。
當所有的命令都不能使用的時候vi也是失去作用的。這時候需要使用shell命令的絕對路徑調用命令。
# 編輯profile文件
/usr/bin/vim /etc/profile
然后在新的窗口執行
source /etc/profile