when in a cygwin, how can I display the windows folder where cygwin is installed?

3

I am in a cygwin bash shell, and I need to find out where cygwin has been installed in windows, e.g. c:\dev\cygwin

I was hoping for an environment variable, something like CYG_WIN_ROOT but can't find anything appropriate.

Is there another way to find out where cygwin has been installed?

Chris Snow

Posted 2013-07-23T07:47:16.687

Reputation: 566

Answers

4

Does this do what you want:

cygpath -w /

Heptite

Posted 2013-07-23T07:47:16.687

Reputation: 16 267

0

Just for your information, such usage is introduced in Cygwin user's guide.

It can be found under 1.6.3 File Access

The library exports several Cygwin-specific functions that can be used by external programs to convert a path or path list from Win32 to POSIX or vice versa. Shell scripts and Makefiles cannot call these functions directly. Instead, they can do the same path translations by executing the cygpath utility program that we provide with Cygwin.

and 3.1.9 Additional Path-related Information

The cygpath program provides the ability to translate between Win32 and POSIX pathnames in shell scripts. See cygpath(1) for the details.

huhiha

Posted 2013-07-23T07:47:16.687

Reputation: 13

1You've misunderstood the question. – Hashim – 2018-03-02T05:03:10.930