Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
newbie question regarding PATH environment variable
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
dmoser
n00b
n00b


Joined: 21 Feb 2006
Posts: 5

PostPosted: Tue Mar 07, 2006 10:59 pm    Post subject: newbie question regarding PATH environment variable Reply with quote

Here's a simple one for one of you out there:

How/where does the PATH environment variable get set for root and for non-root accounts?

Thanks in advance.
Back to top
View user's profile Send private message
Ferdinando
Veteran
Veteran


Joined: 25 Nov 2003
Posts: 1027
Location: Gaeta (LT) - Italy

PostPosted: Tue Mar 07, 2006 11:06 pm    Post subject: Re: newbie question regarding PATH environment variable Reply with quote

dmoser wrote:
How/where does the PATH environment variable get set for root and for non-root accounts?

Generally in /etc/profile:
Code:
if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
        PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
else
        PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"
fi

But it can be modified in ~/.bash_profile or ~/.bashrc.

Bye
_________________
La risposta, non la devi cercare fuori, la devi cercare dentro di te: e però è SBAGLIATA!
-- Corrado Guzzanti, "Pippo Chennedy Show", 1997
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Wed Mar 08, 2006 4:49 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Duplicate Threads.

No crossposting such as https://forums.gentoo.org/viewtopic-t-441139.html
Read the forum guidelines please.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum