Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been using Ubuntu for about a week now. I logged in today and launched the terminal I got presented a whole list of errors. I've tried to chsh but it won't recognise the command. Nor all other common ones.

Any ideas?

Extra info: $PATH:

share|improve this question
What is your $PATH? Type /bin/echo $PATH and edit with the results. – Jjed Oct 3 '12 at 14:16
@JacobJohanEdwards echo is (also) a shell builtin, so even without an echo binary in the PATH, it's can be successfully invoked as just echo, In any case, lordqwerty, please do provide the information Jacob Johan Edwards has requested. Please also run /bin/cat /home/jordan/.profile, then /bin/cat /home/jordan/.bash_profile, then /bin/cat /home/jordan/.bashrc (and then copy all the text from the Terminal by selecting it and doing Edit > Copy, and paste it into your question when editing it). That should provide everything needed to identify the exact problem, and how best to fix it. – Eliah Kagan Oct 9 '12 at 6:01
up vote 1 down vote accepted

Try with:

export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${PATH}"

and then type the command you want to execute, for example:

sudo apt-get update && sudo apt-get upgrade

If this works, you can add the line to your .bashrc inside your home directory to restore the correct PATH.

share|improve this answer
That code worked great thanks! I've launched nano as root to home/jorden/.bashrc and added the export to the top of the file. However when I log out I still get the same error as shown in the screenshot. Would the login.defs also need to be updated? – lordqwerty Oct 3 '12 at 18:11
I run this and then done what Frantique said below and it worked great. Thanks :) – lordqwerty Oct 3 '12 at 18:24

Restore your .bashrc file with: cp /etc/skel/.bashrc ~/, after that reboot, and enjoy!

share|improve this answer
When I done the above and then done this is worked. Thanks! :) – lordqwerty Oct 3 '12 at 18:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.