Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Gary R. Van Sickle" To: Subject: RE: how to add a specified path to PATH Date: Sat, 5 Jan 2002 03:17:11 -0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal > -----Original Message----- > From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com]On Behalf > Of Guenther Sohler > > Assuming you are using bash(this is the default) > > put following stetement into your ~/.bashrc file > > export PATH=$PATH: > > is the new path > Actually I think it's probably marginally better to do it in .bash_profile (of course assuming you're using bash as your login shell) like this: .bash_profile: # Do everything that would be done in non-interactive mode. source $HOME/.bashrc .... # The path already has stuff in it, but # we can add to it here if we need to. export PATH=:$PATH: .... The idea here is to load up as much stuff as possible into .bash_profile, which is only run once per bash window you start, as opposed to .bashrc, which will be run not only then but also in any sub-bash's you may end up spawning. At the same time, since you've done the export, any subshells (bash or not) will still get the right path (in fact if you're setting PATH in .bashrc it'll double in length in every level of sub-bash you spawn). Now since /bin/sh isn't bash anyway, you're probably not spawining any sub-bashes, so the issue is largely academic. But still. -- Gary R. Van Sickle Brewer. Patriot. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/