出現這個問題說明你的 /etc/profile 配置出現了問題
問題如下,ll命令不能使用 vim 命令不能使用 等大部分命令無法使用
bash: vim: command not found...
Failed to search for file: Cannot update read-only repo
首先將你剛纔修改的/etc/profile 恢復到你修改之前的。此時無法直接vim /etc/profile
使用命令
/usr/bin/vim /etc/profile
可進入編輯文件
修改後保存!
然後新開一個窗口,執行命令
source /etc/profile