How do I get rid of Cygwin's /cygdrive prefix in all paths?

Grepping around in /etc turned up a link that Googling did not. It turns out you can control this in the file /etc/fstab. Just add a line that says

none / cygdrive binary 0 0

and the problem should be fixed. No more kludgey fixes in .bashrc, and no messed-up $PATH.


Method one

mount -c /
mount -m > /etc/fstab

Method two

echo - / cygdrive acl > /etc/fstab

Example


Yes, mount should work.

mount -c /

If you still have entries in PATH that refer to /cygdrive, then you probably just need to reboot.

Also, check if there are any PATH settings in /etc/profile that refer to /cygdrive.