This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Setup Path


Thank you very much for information. I think I can get it now.

Todd Poole

On 2/20/2014 10:01 AM, Eliot Moss wrote:
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


--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]