Ubuntu – What are the Default $PATH Values

command lineenvironment-variables

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?

Best Answer

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