What are the Default $PATH Values?

On Mac OS X, the default $PATH values are:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

What are the default values on Linux?


Solution 1:

On a default Ubuntu desktop install $PATH is:

$ echo $PATH
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

But in a minimal chroot environment created by debootstrap, $PATH only contains:

# echo $PATH
/usr/sbin:/usr/bin:/sbin:/bin

Solution 2:

Environment path values are stored in .bashrc file in ubuntu.

The system-wide PATH variable is defined in /etc/environment