debian 提示符號已損壞

debian 提示符號已損壞

當我透過 ssh 或從控制台登入時,我看到的是:

Linux sensu.lbox.com 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1+deb7u1 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Sep 27 12:40:33 2013
-bash: id: command not found
-bash: [: : integer expression expected
root@sensu:~#

這是什麼以及如何擺脫它?

-bash: id: command not found
-bash: [: : integer expression expected

我無法執行大多數命令,它說command not found instead

謝謝。

答案1

它最終是由錯誤的 /etc/environment 檔案引起的。

答案2

是所有使用者都會出現這種情況還是只有 root 使用者才會出現這種情況?如果是每個人,請嘗試在 /etc/profile.d 下尋找最近修改過的腳本(因為問題開始發生)find /etc/ -path *profile* -mtime -5 。如果它只是針對 root,請嘗試先查看 /root/.bashrc 是否有一些錯誤的腳本。

相關內容