[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Keeping $PATH consistent



Whether it is bash or sh will alter the commands you may use.

The easiest way to do what you are doing is:

PATH=/bin:/sbin .. etc
export PATH

Put these lines in /etc/profile.

In the users ~/.bashrc or ~/.bash_profile (or whichever is read) and add
this:

if [ -f /etc/profile ]; then
  . /etc/profile
fi

Then all users should be the same as long as they all source
/etc/profile.




-----Original Message-----
From: Bob Alexander [mailto:bob@ngi.it] 
Sent: Wednesday, April 13, 2005 4:17 AM
To: Debian Users
Subject: Keeping $PATH consistent

Let's see if this time I make it :)

I have been reading the bash manpage and came out a bit confused.

I would simply (?) desire for my user bob that whether a bash shell is a

login shell or not, whether it is invoked as bash or sh, whether a 
console or in a xterm, my PATH variable is always the same.

As a derivative requirement I would like to have the least number of 
files, possibly ONE, in which I setup and change things.

Other than symlinking ~/.bash_profile and ~/.bashrc and setting PATH in 
one of those, should I look after other variables ?

Thank you,
Bob


-- 
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org



Reply to: