I assume this question has be asked many times.I just can't manage to change the PATH var permanently. This is what I do:
nano ~/.profile
export PATH=$PATH:/my/additional/path
save changes
I even created the ~/.pam_environment file to try to define the PATH in there but it simply want last after the new login;.
What am I doing wrong? p.s. Im currently on Debian 8
.pam_environment
should work. The.profile
.bash_profile
and.bashrc
files are sourced after pam environment though so depending on what sort of shell you are interacting with (or not) they may be overwriting thePATH
variable if it's set in one of those files. – jesse_b Aug 12 '17 at 12:52/etc/skel/.bashrc
file as something like:export PATH=$PATH:$HOME/usr/bin
orPATH=$PATH:/usr/$USER/bin
orPATH=$PATH:/usr/$(whoami)/bin
– jesse_b Aug 12 '17 at 12:57.profile
is the right place. How do you log into the account (GUI login, text console, SSH, …)? What is the value ofPATH
? What other dot files does the user have? What is the user's login shell? Post the output ofbash --login -x
. – Gilles 'SO- stop being evil' Aug 12 '17 at 21:57