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 tried to enter the command nano ~/.bashrc in order to include some path into the .bashrc file in home directory but I'm not able to run any command and I get always the following error:

rag@rag-Satellite-C640:~$ nano ~/.bashrc
Command 'nano' is available in the following places
 * /bin/nano
 * /usr/bin/nano
The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.
nano: command not found

Why this is happening with any command that I'm trying?

What I want to do is edit the .bashrc file.

share|improve this question
add comment

1 Answer 1

  • Update the PATH variable to include /usr/bin:/bin:/usr/sbin.
export $PATH=$PATH:/usr/bin:/bin:/usr/sbin
  • Open the /etc/environment file to save the variable permanently.
gksudo gedit /etc/environment
  • Make sure the PATH variable is initialized as follows:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
share|improve this answer
add comment

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.