When I login via ssh or from the console this is what I see:

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

What is this and how do I get rid of it?

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

I am unable to most commands and it says command not found instead


migrated from serverfault.com Sep 29 '13 at 8:13

This question came from our site for system and network administrators.

  • 1
    I think this is pretty far off-topic for server fault. I'd suggest superuser or unix & linux. To get you started: your startup files for bash (.bash_profile, .bashrc, et al.) have syntax issues. Your path is not being set properly as well (likely due to above problem). – yoonix Sep 27 '13 at 19:50
  • Sounds like you've somehow broken your entire system. What did you do? – Michael Hampton Sep 27 '13 at 20:18
  • Are all your filesystems mounted? Your syste appears to be pretty broken. What happens when you run /bin/ls -al /usr/bin/id? Hopefully you see something like -rwxr-xr-x 1 root root 31232 Nov 19 2012 /usr/bin/id? Have you changed your path? Have you recently performed a recursive chown/chmod? Is a HD failing? – Zoredache Sep 27 '13 at 20:18
  • Thanks guys! I had edited my /etc/environment file incorrectly. – David Neudorfer Sep 27 '13 at 20:58

Does this happen for all users or just root? If it's everyone, try looking under /etc/profile.d for a script that was modified recently (since the problem started happening).. You could do find /etc/ -path *profile* -mtime -5 for something modified in the last 5 days. If it is just for root, try looking at /root/.bashrc first for some bad scripting.

  • Thanks! I had edited my /etc/environment file incorrectly. – David Neudorfer Sep 27 '13 at 20:59

It ended up being caused by a bad /etc/environment file.

  • Remember to click the check mark so that this question is marked as solved. – Michael Hampton Sep 28 '13 at 0:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy