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:
After that copy and paste your export PATH into bashrc file then save and exit.
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.