Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Aug 1999 18:29:50 -0700
From:      Eric Hodel <hodeleri@seattleu.edu>
To:        Ng Kok Leong <klng@psl.com.sg>
Cc:        freebsd-newbies@FreeBSD.ORG, freebsd-user-groups@FreeBSD.ORG
Subject:   Re: path
Message-ID:  <37B6180E.E9F5335F@seattleu.edu>
References:  <37B404C4.332848AE@psl.com.sg>

next in thread | previous in thread | raw e-mail | index | archive | help
Ng Kok Leong wrote:
> 
> Hi,
> 
> I am new to FreeBSD and currently I am working with FreeBSD3.2.
> May I know where can I set the directory path so that I do not have
> to go to the directory where the file resides in order to access it?
> I have tried to set the PATH variable in the .profile file but this does

If you are using sh, you can set your path in the .profile, but this
will only run on a login shell.  If you have root using the sh shell, it
won't pick up the sbin directories if you su.  Use the .shrc and add
ENV=$HOME/.shrc;export ENV in order to have sh set a new path when you
su, and don't forget to make .shrc executable.  You can add path changes
vi command line editing, aliases, etc to the .shrc file, and they will
be run whenever the shell is started (I think this is the prefered
way.)  Also don't add . to your path, it opens a security hole (and it
is not too difficult to get used to using ./<executable>)

-- 
Eric Hodel
hodeleri@seattleu.edu

"They cook your gonies"
     -Terry Lambert's uncle on why he doesn't have a microwave


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-user-groups" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37B6180E.E9F5335F>