This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Setup Path
- From: Eliot Moss <moss at cs dot umass dot edu>
- To: cygwin at cygwin dot com
- Date: Thu, 20 Feb 2014 10:01:42 -0500
- Subject: Re: Setup Path
- Authentication-results: sourceware.org; auth=none
- References: <530600B8 dot 6050504 at mail dot com> <0D835E9B9CD07F40A48423F80D3B5A702CDE5DF8 at USA7109MB022 dot na dot xerox dot net>
- Reply-to: moss at cs dot umass dot edu
On 2/20/2014 8:34 AM, Nellis, Kenneth wrote:
From: Todd Poole
Hi all
Really new to Cygwin. Is there a way to setup Cygwin so when I got to
terminal to type a command I don't have to enter the complete path as
shown here:
$ cd /cygdrive/c/directory name
Anyway to setup to where I might just enter
$ c/directory name
or something like it?
I suggest you look into the CDPATH environment variable.
That would simplify what you type as an argument to the cd command.
If you are wanting to be able to invoke a command foo without typing
its whole path, then you need its directory in the PATH variable.
PATH in cygwin is similar to PATH on Windows, but the format is
more like Unix: / instead of \, : instead of ;, and so on. The
command:
echo $PATH
will show you the default. You can add a directory to be searched
after the default ones by doing something like:
PATH="${PATH}:additional-directory"
The quotes are important if anything in PATH has spaces or other "strange"
characters.
By the way, this is standard Unix / bash stuff. cygwin kind of assumes that you
are familiar with Unix, since its purpose is to offer a Unix-like environment
on Windows. (bash, the Bourne-again shell, is the default shell brought up in
a cygwin terminal window.)
Best wishes -- Eliot Moss
--
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