16

I am using Ubuntu Desktop 14.04, and as such, I am using the non-login shell. When I open the GUI terminal, first the non-login shell sessions read the following startup files:

/etc/bash.bashrc
~/.bashrc

The non-login shells inherit the environment from the parent process, which is a login shell, so the session also reads the following startup files:

/etc/profile
~/.bash_profile

However, I cannot find the $PATH for system-wide paths like /bin, /sbin, /usr/bin, /usr/sbin, set in any of these files. Where is the $PATH set for these directories?

Donato
  • 613

1 Answers1

25

The (default) system wide PATH is set in the /etc/environment file.

$ cat /etc/environment 
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

It is basically the place to save the global environment variables.

heemayl
  • 93,925