Editing /etc/profile, some doubts

Robert P. J. Day rpjday at mindspring.com
Sat Jan 29 15:22:48 UTC 2005


On Sat, 29 Jan 2005, Leandro Melo wrote:

> Thanks Robert.
> However, i'm very new to linux and don't know shell scripting very well.
> How exactly would this script look like?
> As i said, i just want to add one of my folders to my path enviroment
> variable. Specifically, i got a directory called /myStuff that has
> some programs. I'd like to add this folder to my PATH variable so i
> can these programs from any folder i'm in.
> Thanks.

  first, take a look in /etc/profile.d.  you'll see several files of
the form *.sh.  just create a new one along those lines, with the
single line:

PATH=/myStuff:$PATH

(although i *strongly* discourage adding new directories at the root.)

  part of the login process (as long as you're using bash) is to
automagically run all of the scripts in that directory whose names are
of the pattern *.sh.

rday




More information about the fedora-list mailing list