I can't seem to determine where the bash PATH
environment variable is getting setup on my fresh Ubuntu 16.10 install.
I have tried placing echo $PATH
statements at the top of ~/.bashrc
and even /etc/bash.bashrc
. Both echo statements get executed, so these files are loading properly, But, in both cases the PATH
already contains the following:
/home/carl/bin:/home/carl/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
The first entries (/home/carl/bin:/home/carl/.local/bin
) are what I'm trying to track down. I'm not really sure where any of the values are set since changing /etc/environment
seems to have no effect.
The PATH
is also setup when /etc/profile
executes when using a login shell and is also unaffected by changes to /etc/environment
.
~/.profile
~/.profile
. That isn't executed at all in an interactive non-login shell.~/.profile
(which explains whygnome-terminal
defaults to non-login shells) and requires logging out to take effect. Sorry @steeldriver for not understanding why you were correct.