Mailinglist Archive: opensuse (4749 mails)

< Previous Next >
Re: [SLE] Root PATH
  • From: Thomas Jones <thomas.jones@xxxxxxxxxxxxxxxx>
  • Date: Sun, 11 May 2003 17:05:37 -0500
  • Message-id: <200305111705.37906.thomas.jones@xxxxxxxxxxxxxxxx>
On Sunday 11 May 2003 16:30, Stan Green wrote:
> In SuSE 8.1, how do I permanently modify the path the root uses? I modified
> /etc/profile, but that did not seem to work. If /etc/profie is the correct
> file, where in the file do I change the path?
> Thanks,
> Stan Green

That depends. Do you want to alter your login shell or interactve shell? On a
SuSe system the ~/.bashrc file is sourced from /etc/profile. It is generally
suggested that you make changes in your ~/.bashrc file and do not alter the
entire system configuration.

But, at times it may be necessary. Thus you will look for the following lines:

if test -z "$PROFILEREAD" ; then
for dir in $HOME/bin/$CPU $HOME/bin ; do
test -d $dir && PATH=$dir:$PATH
As you can see, i have changed my /etc/profile to include a bin directory
under every users $HOME. It is located at the beginning of the PATH
declaration. This is so, because i wanted a few of my own binaries to be
found before the system binaries of the same name. Regardless of what user i
may be logged in as.

Remember: the placement of PATH directories matters. First found is first

To do the same in the .~/bashrc file do this:

export PATH=${PATH}:${HOME}/bin


Thomas Jones
Linux-Howtos Administrator

< Previous Next >
Follow Ups