From owner-freebsd-user-groups Sat Aug 14 18:30:21 1999 Delivered-To: freebsd-user-groups@freebsd.org Received: from exegrnnts001.seattleu.edu (exegrnnts001.seattleu.edu [206.81.198.91]) by hub.freebsd.org (Postfix) with ESMTP id E43251526E; Sat, 14 Aug 1999 18:30:18 -0700 (PDT) (envelope-from hodeleri@seattleu.edu) Received: from seattleu.edu (ppp27.pm3b.wport.com [206.129.99.174]) by exegrnnts001.seattleu.edu with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0) id QS0G8N34; Sat, 14 Aug 1999 18:30:08 -0700 Message-ID: <37B6180E.E9F5335F@seattleu.edu> Date: Sat, 14 Aug 1999 18:29:50 -0700 From: Eric Hodel Organization: Dis X-Mailer: Mozilla 4.51 [en] (X11; I; FreeBSD 3.2-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Ng Kok Leong Cc: freebsd-newbies@FreeBSD.ORG, freebsd-user-groups@FreeBSD.ORG Subject: Re: path References: <37B404C4.332848AE@psl.com.sg> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-user-groups@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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 ./) -- 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