修改 /etc/profile 環境變數出錯 (如 PATH 遺漏 /usr/bin),導致圖形登入失敗,但字元介面 (TTY) 仍可登入。
vim /etc/profile → 修正錯誤的 export PATH=... 行。reboot 或 init 6。圖形登入即恢復正常。
/etc/profile 前先備份:cp /etc/profile /etc/profile.bak。source /etc/profile 在當前 Shell 驗證無誤,再重啟。/etc/profile.d/*.sh 獨立檔案,降低風險。