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
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.
-
-
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 thePATH
in/etc/environment
otherwise works for me at least under Ubuntu 12.04 LTS.– ChrikiMay 27, 2013 at 13:36