How do I remap the drive that Cygwin uses as root `/`?

4

By default, cygwin maps my c:\ as /cygrive/c and this is causing some programs some issues. How can I permanently map c:\ to /?

The cygwin c documentation is really hard to follow... I have no idea what to look for.

I'm using the latest Cygwin.

Ayman

Posted 2011-04-12T12:35:49.313

Reputation: 215

Answers

6

You can't map DOS "c:" to Cygwin "/". Cygwin needs its own root directory to be the root. You could map it to "/c" if you wanted. Since this solution won't work, why not instead post the problem you're having with "some programs", which can probably be solved? It would also be good to name the programs.

CarlF

Posted 2011-04-12T12:35:49.313

Reputation: 8 576

Unfortunately I can't remember the exact program, but it it did have to do with a Windows program run from bash and it did not like the /cygdrive/c part. How can i change to '/c' ? – Ayman – 2011-04-12T14:22:33.333

I doubt a Windows program that gets its origin path from Bash would like "/" either. – CarlF – 2011-04-12T15:47:00.717

That is the "good" thing. a Windows program does accept / in the path. Not in the command prompt, but you can pass it using script or config files and it would work. – Ayman – 2011-04-12T16:11:12.307

3

You can only make C:\ the same as / by installing Cygwin into C:\. It's discouraged, but it does work.

ak2

Posted 2011-04-12T12:35:49.313

Reputation: 3 387