How is the default value of PATH environment variable being set in Fedora?

Piotr Dobrogost p at lists-2014.dobrogost.net
Wed Dec 17 08:38:15 UTC 2014


Hi!

When I login using terminal (for instance after pressing CTRL+ALT+F2)
the `PATH ` environment variable looks like this:

`/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin/:/usr/sbin:/home/user/.local/bin:/home/user/bin`

However when I open new Konsole window it looks like this:

`/usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/home/user/.local/bin:/home/user/bin`

Notice, that in the first case `/usr/local/bin` precedes
`/bin:/usr/bin` whereas in the second case it's the other way around.

What mechanism governs this and how can I configure it so that in the
second case `/usr/local/bin` precedes `/usr/bin`?

I took a look in `/etc/profile` but there I see only `/usr/local/sbin`
and `/usr/sbin` being set:

    # Path manipulation
    if [ "$EUID" = "0" ]; then
        pathmunge /usr/sbin
        pathmunge /usr/local/sbin
    else
        pathmunge /usr/local/sbin after
        pathmunge /usr/sbin after
    fi

In the `/etc/environment` I have nothing that sets or changes `PATH`.

I know I can overwrite `PATH` in one of bash rc scripts but I would
like to know how this default `PATH` is being set in the first place.


I'm on KDE spin of Fedora 21.

Thank you in advance.

Regards,
Piotr Dobrogost


More information about the users mailing list