Path Variable in Ubuntu
FOSS, Linux, Terminal, Ubuntu February 5th, 2008
Unlike most other linux distros, the PATH environment variable cannot be set in Ubuntu by adding an assignment statement in the ~/.bash_profile script. This has been annoying me for some time and I was trying different things until I eventually thought of googling for it. Here’s how it is done.
There is a file called /etc/environment. This is where you set the path variable. Goto terminal, type
$ sudo vim /etc/environment
to edit it.
Ubuntu is known for wandering away from conventions, but why did they have to change this? The /etc/environment file is ok, the ~/.bash_profile method doesn’t work anymore. That means, there is no standard startup script in Ubuntu except the System -> Preferences -> Sessions dialog. Nobody would want the terminal to lose its power. I hope the Ubuntu developers know what they’re doing.














