Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have been trying to edit the environment variable. I had read this and in the section of Persistent environment variable ->System-wide environment variables it is written to change the /etc/environment file, but even after doing that the variable is same as before.
But when I echo $PATH as root user the change is reflected. I have read many questions regarding this on the site but many of the answers given are not recommended according to the article given in the link above.

share|improve this question

1 Answer 1

Did you log yourself out after the change and log in again? The changes will only be visible then. That would also explain why root can see the changes.

share|improve this answer
    
Yeah I have tried that but still the $PATH variable is not changed.And also the $PATH variable for root user is very much different form the non sudo $PATH variable. Here I have a snapshot –  Saurabh May 26 '13 at 7:11
    
Can you make sure that your $PATH variable is not set in any other startup script/file like ~/.bash_profile, ~/.bash_login, ~/.bashrc, ~/.profile or ~/.pam_environment? Which version of Ubuntu are you using? Changing the PATH in /etc/environment otherwise works for me at least under Ubuntu 12.04 LTS. –  Chriki May 27 '13 at 13:36

Your Answer

 
discard

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.