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 was trying to set PATH in etc/environment file, but after adding the desired path the $PATH is showing an error in terminal:

bash: /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: No such file or directory

Here's the content of environment file:


I was trying to add the path to the folder google_appengine to the PATH as mentioned in this Answer, but it doesn't seem to work.

share|improve this question
@Rinzwind Actually, I'm guessing he checked the path by just typing $PATH into the terminal, rather than echo $PATH – glibdud Nov 10 '12 at 17:29
@glibdud exactly, but what's the problem here? echo $PATH returns /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin for root , and for other users it returns /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbi‌​n:/bin:/usr/games:/usr/local/games. – Ashwini Chaudhary Nov 10 '12 at 17:31
up vote 5 down vote accepted

After adding to the path in /etc/environment, you'll need to log out of your user session and back in. After that, it should pick up the new path.

share|improve this answer
okay, let me try that. – Ashwini Chaudhary Nov 10 '12 at 17:34
Thanks it worked fine after logging out. – Ashwini Chaudhary Nov 10 '12 at 17:42
Excellent @glibdud – Rinzwind Nov 10 '12 at 17:42
It didn't work for me, so I used .xsessionrc: – e-malito Dec 12 '13 at 12:55

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.