bbodenmiller
bbodenmiller

Reputation: 3181

How to get the Windows path to Cygwin home directory?

How can I programmatically determine the current Cygwin user's home directory in Windows format (e.g. C:\cygwin\home\user) so I can read from it outside of Cygwin Bash?

Upvotes: 71

Views: 57358

Answers (1)

Daniel Haley
Daniel Haley

Reputation: 52848

You can use cygpath:

cygpath -w ~

Example output:

C:\Users\dhaley

Upvotes: 101

Related Questions