Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

the default .profile does not export PATH, still the PATH set there is available to all processes.

How does that work?

share|improve this question
up vote 3 down vote accepted

If there is already an exported shell variable, then subsequent resetting of the variable will automatically export it. So in this case, if you run "env" prior to where .profile sets PATH, you will probably see it was previously set / exported (either in /etc/profile, /etc/bash_profile, or somewhere else).

share|improve this answer
it looks like login initially sets PATH making it implicitly exported, then (loaded by login, I think) resets it based on /etc/environment – Alex Sep 9 '12 at 3:00

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.