Question: How to add path variable(s) in linux/ubuntu?
Answer: You can use the following methods, the difference is in the 1st method, system forgets path variable when you log out but in the second one it does not forget till you edit .bashrc file.
run bash command in terminal; ‘$ export PATH_VARIABLE_NAME=PATH’
open ~/.bashrc file and edit it by adding ‘$ export PATH_VARIABLE_NAME=PATH ‘
-> you can edit by running ‘$ nano ~/.bashrc’ add above line to the end of the document and hit ‘CTRL + X’ , hit ‘Y’, hit enter.
either restart the terminal or run ‘$ source .bashrc’
test your new path ‘$ echo $PATH_VARIABLE_NAME’
note: make sure you dont have any spaces between PATH_VARIABLE_NAME and PATH