Set Permanent Base PATH Variable on Ubuntu

By | September 14, 2018

how to add a directory to the PATH environment variable in linux?

Set Permanent Base PATH Variable on Ubuntu

Open terminal and type command “sudo su”, then edit bashrc file with nano or vim like below:

nano ~/.bashrc

After that copy and paste your export PATH into bashrc file then save and exit.

Summary

The bashrc file will run when you login via the console, or log in using ssh. After that your PATH settings from bashrc will then be available. In contrast, once you are logged in, and you open a command shell or run the bash command.

Leave a Reply

Your email address will not be published. Required fields are marked *