Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Ubuntu the path variable is stored in /etc/environment. This is mine (I've made no changes to it, this is the system default):

$ cat /etc/environment 

but when I examine my PATH variable:

$ echo $PATH

You'll notice /usr/games is missing (it was there up until a few days ago). My /etc/profile makes no mention of PATH. My ~/.profile is the default and only has:

if [ -d "$HOME/bin" ] ; then

This only happens in gnome, not in tty1-6. This is missing from both gnome terminal and when I try to call applications from the applications dropdown. Anyone know what could be causing this?


share|improve this question
up vote 3 down vote accepted

If your shell is bash, it pays no attention to /etc/environment at least as far as the manpage and an strace bash says. Indeed, I can find no program listed that does mention /etc/environment.

I've run into similar situations under Ubuntu where there are 4 or more levels of indirection pointing to the datum that you really want. Often times I find it easier to fix the proximate, rather than the ultimate source of the datum.

In this case, modifying your personal path in ~/.profile is in fact the proper way to do it since at least V7 Unix.

share|improve this answer
Yes, I'm familiar with that solution, but that is a user level solution for a system level problem. I would actually like to address the problem. There are plenty of places I could just override the PATH variable, like /etc/profile as well, but that has nothing to do with PATH on Ubuntu, so I would prefer to address it where the problem lies. – Jarvin May 18 '10 at 16:58
Today I have the same problem as the OP: I rebooted and suddenly the correct PATH is no longer available in bash. It was yesterday. Something is actually broken... – Izkata Mar 30 '14 at 14:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .