1

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.

1 Answer 1

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.

2
  • 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, 2013 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, 2013 at 13:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .