Server Fault is a question and answer site for system and network administrators. 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 don't have much experience with export but it gives me the impression that it's quite similar with eval.

Am I wrong or not?

share|improve this question

Normally variables assigned to are only available to the current shell process. export makes sure that child processes have the environment variable set as well.

echo "$foo"
bash -c 'echo "$foo"'
export foo=123
echo "$foo"
bash -c 'echo "$foo"'
share|improve this answer

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.