Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

Was hoping someone can explain what the command to exporting a path variable means?


alias TEST1="/usr/local/test1"

export PATH=$TEST1:$PATH

Does the colon append?

share|improve this question
Your syntax is not correct, you don't need the alias keyword. – enzotib Jan 27 '12 at 16:19

$PATH is a variable where bash looks for executables.

It is a list of directories separated by a :

echo $PATH

So yes you are adding $TEST1 to your path

If you set a variable in a bash shell, the variable is available only within the context of the script. When you export it, it is available outside the script.


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.