Reputation: 1544
I have Windows 7 64-bit PC. I just installed Cygwin latest version 2.6.0 on it in c:\cygwin64
directory. During installation I make sure that I selected these packages: gcc-core
, make
, openssl
, ssh
, vim
, emacs
, scp
and ftp
. The installation completed successfully.
Now I am looking at the c:\cygwin64
directory and I see some directories are missing:
/bin
(directory exist) /sbin
(directory exist) /usr/bin
(directory does not exist) /usr/sbin
(directory exist) /usr/local/bin
(directory exist) /usr/local/sbin
(directory does not exist)So why /usr/bin
and /usr/local/sbin
directories are missing? Are they obsolete?
Thanks
Upvotes: 4
Views: 7375
Reputation: 855
As Erik said, c:\cygwin64\usr\bin
is really c:\cygwin64\bin
in your case. As for /usr/local/sbin/
, perhaps nothing was going to be installed there from those packages, so it was not created.
According to the FAQ for the Cygwing directory structure
4.33. Why the weird directory structure? Why do /lib and /usr/lib (and /bin, /usr/bin) point to the same thing?
Why use mounts instead of symbolic links?
Can I use a disk root (e.g., C:) as Cygwin root? Why is this discouraged?
After a new installation in the default location, your mount points will look something like this:
bash$ mount C:\cygwin\bin on /usr/bin type ntfs (binary,auto) C:\cygwin\lib on /usr/lib type ntfs (binary,auto) C:\cygwin on / type ntfs (binary,auto) C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
Note that /bin and /usr/bin point to the same location, as do /lib and /usr/lib. This is intentional, and you should not undo these mounts unless you really know what you are doing.
Various applications and packages may expect to be installed in /lib or /usr/lib (similarly /bin or /usr/bin). Rather than distinguish between them and try to keep track of them (possibly requiring the occasional duplication or symbolic link), it was decided to maintain only one actual directory, with equivalent ways to access it.
Symbolic links had been considered for this purpose, but were dismissed because they do not always work on Samba drives. Also, mounts are faster to process because no disk access is required to resolve them.
Note that non-cygwin applications will not observe Cygwin mounts (or symlinks for that matter). For example, if you use WinZip to unpack the tar distribution of a Cygwin package, it may not get installed to the correct Cygwin path. So don't do this!
It is strongly recommended not to make the Cygwin root directory the same as your drive's root directory, unless you know what you are doing and are prepared to deal with the consequences. It is generally easier to maintain the Cygwin hierarchy if it is isolated from, say, C:. For one thing, you avoid possible collisions with other (non-cygwin) applications that may create (for example) \bin and \lib directories. (Maybe you have nothing like that installed now, but who knows about things you might add in the future?)
Upvotes: 7