X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-47.1 required=5.0 tests=AWL,BAYES_50,BOTNET,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-id: <4D4EE981.4060309@verizon.net> Date: Sun, 06 Feb 2011 13:33:37 -0500 From: Gerry Reno User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc11 Thunderbird/3.0.4 MIME-version: 1.0 To: cygwin AT cygwin DOT com Subject: 1.7.7: PATH in Bash shells Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com What is the proper method to set the PATH variable on a system-wide basis in Cygwin? Right now in the Cygwin Bash shell the PATH is set to: bash-4.1$ echo $PATH /cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wb em:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/90/Tools/binn/:/usr/bin I think what I need is for the system-wide PATH to look something like this: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/90/Tools/binn/ This is because I have some scripts that I bring over from my Linux environment that fail under Cygwin because they cannot find executables in places like /usr/sbin or /usr/local/bin or in the case of some executables like 'find' they find the Windows version which breaks the script. The PATH in my Linux environments looks like this: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin Is the PATH setting I'm looking for workable with Cygwin? Or do the Windows paths need to come first for some reason? I've read this: http://www.cygwin.com/cygwin-ug-net/setup-env.html But it didn't provide a lot of guidance. Is there some guiding document about setting PATH system-wide to better support scripts from Linux? Regards, Gerry -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple