Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

http://oi48.tinypic.com/2zxt93d.jpg

Extra info: $PATH:

/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/jorden/android-sdk-linux/tools:/home/jorden/android-sdk-l
share|improve this question
    
What is your $PATH? Type /bin/echo $PATH and edit with the results. –  Jacob Johan Edwards 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

2 Answers 2

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
1  
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

 
discard

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.