Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

I changed the /etc/environment to add more directories to the PATH variable. But looks like $PATH in double quotes were not expanded and I could find any command from the shell and /usr/bin/command-not-found is run.

$ cat /etc/environment 

so from the tty,

$ echo $PATH

why did not the expansion happen?

share|improve this question
up vote 2 down vote accepted

/etc/environment is shell agnostic. This means it doesn't depend on the way e.g. bash to any expansion.

You can use only the simple key=value assignments here.

share|improve this answer
which process reads these key pairs? – rag Mar 7 '13 at 21:07
e.g. look at grep "/etc/environment" /etc/pam.d/* – H.-Dirk Schmitt Mar 7 '13 at 21:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.