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

I have a environmental variable called "PATH" which has a value, now I want to append a new value to the existing value of a variable "PATH" and to set it permanently.

share|improve this question
up vote 5 down vote accepted

To append to $PATH:

export PATH="$PATH:/extra/directory/here"

To make it 'permanent', add that line to ~/.profile

share|improve this answer
adding the line to ~/.profile will make it permanent for your user account. – Elder Geek Oct 22 '14 at 22:45

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.