temporary change will gone after the terminal closed
1. Ctrl+Alt+T
2. export PATH=$PATH:{your path}
user level enviroment varible file location
- ~/.profile
- ~/.bash_profile or ~./bash_login
- ~/.bashrc
not recommand to use for the version prior to Ubuntu 10.0
system level enviroment varible file location
- /etc/environment
- /etc/profile
- /etc/bash.bashrc
/etc/profile and /etc/bash.bashrc not recommend to use fro the version prior to Ubuntu 10.0
open file:
$ sudo nano /etc/profile
append statement:
export PATH="$PATH:/my_new_path"
make it effective immedicately without login again
$source /etc/profile