Gentoo Archives: gentoo-user

From: Alecks Gates <alecks.g@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Updating $PATH variable permanently for root not working
Date: Sun, 05 Jan 2014 20:43:35
Message-Id: CAKkyAYYkbPuRt_Xy2FLPPAQQjewOnCZwd-rmYim4GK+rAps65w@mail.gmail.com
In Reply to: [gentoo-user] Updating $PATH variable permanently for root not working by Tanstaafl
1 On Sun, Jan 5, 2014 at 9:28 AM, Tanstaafl <tanstaafl@×××××××××××.org> wrote:
2 > Not sure what I'm missing...
3 >
4 > I login as normal user, then su - to root...
5 >
6 > I've created /root/.bashrc, and added the following:
7 >
8 > export PATH="${PATH}:/path/I/want/to/add"
9 >
10 > If I logout, then su - back into root, shouldn't I see the new path?
11 >
12 > Manually exporting it during the session works, so obviously I'm missing
13 > something...
14 >
15
16 Personally, I had to create /root/.bash_profile for .bashrc:
17
18 ~ # cat .bash_profile
19 # /etc/skel/.bash_profile
20
21 # This file is sourced by bash for login shells. The following line
22 # runs your .bashrc and is recommended by the bash info pages.
23 [[ -f ~/.bashrc ]] && . ~/.bashrc
24
25 --
26 Alecks Gates