2

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.

5
  • 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"

Your Answer

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

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