Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Whatever I try to run, I get the error:

The command could not be located because '/usr/bin' is not included in the PATH environment variable.

I had some modification in my .bashrc file but then removed the two additional lines afterwards. However somehow the PATH variable seems to have been destroyed.

share|improve this question

2 Answers 2

up vote 8 down vote accepted

The PATH should restore on Reboot; anyways, if not the case you can find an Original .bashrc on: /etc/skel/.bashrc Overwrite using it; good luck.

share|improve this answer
Here's the base path from a standard user on my system (which has sudo): /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin. If you put into .bashrc: export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin, then do source ~/.bashrc, it may restore the functionality you need. All this is in the terminal, of course. NOTE: I have not tested this! – Thomas W. Jul 11 '11 at 4:09
Life saver. thank you good sir. – dopatraman Nov 14 '14 at 3:18

May be you accidentally did the following.

export PATH=<some path>

Actually you have replaced the PATH , may be what you should have done is ,

export PATH=$PATH:<some path>

but this may not be your case. But that same error can be used to recover ,

try below,

export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

this should work.

share|improve this answer

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.