pR〇p〇LlS一一丅〇OTHPASTE家用汗蒸箱字写

Cygwin FAQ
Cygwin FAQCygwin FAQ1.
1.1. 1.2. 1.3. 1.4. 1.5. 1.6. 2.
2.1. 2.2. 2.3. 2.4. 2.5. 2.6. 2.7. 2.8. 2.9. 2.10. 2.11. 2.12. 2.13. 2.14. 2.15. 2.16. 2.17. 2.18. 2.19. 2.20. 2.21. 2.22. 2.23. 2.24. 3.
3.1. 3.2. 3.3. 4.
4.1. 4.2. 4.3. 4.4. 4.5. 4.6. 4.7. 4.8. 4.9. 4.10. 4.11. 4.12. 4.13. 4.14. 4.15. 4.16. 4.17. 4.18. 4.19. 4.20. 4.21. 4.22. 4.23. 4.24. 4.25. 4.26. 4.27. 4.28. 4.29. 4.30. 4.31. 4.32. 4.33. 4.34. 4.35. 4.36. 4.37. 4.38. 4.39. 4.40. 4.41. 4.42. 4.43. 4.44. 4.45. 4.46. 5.
5.1. 5.2. 5.3. 5.4. 5.5. 5.6. 5.7. 5.8. 5.9. 5.10. 5.11. 5.12. 5.13. 5.14. 6.
6.1. 6.2. 6.3. 6.4. 6.5. 6.6. 6.7. 6.8. 6.9. 6.10. 6.11. 6.12. 6.13. 6.14. 6.15. 6.16. 6.17. 6.18. 6.19. 6.20. 6.21. 6.22. 6.23. 6.24. 6.25. 6.26. 6.27. 6.28. 6.29. 6.30. 6.31. 6.32. 6.33. 6.34. 6.35. 6.36. 6.37. 6.38. 6.39. 6.40. 7.
7.1. 1. About Cygwin1.1. 1.2. 1.3. 1.4. 1.5. 1.6. 1.1.What is it?Cygwin is a distribution of popular GNU and other Open Source tools
running on Microsoft Windows.
The core part is the Cygwin library which
provides the POSIX system calls and environment these programs expect.
The Cygwin distribution contains thousands of packages from the Open
Source world including most GNU tools, many BSD tools, an X server and a full
set of X applications.
If you're a developer you will find tools, headers
and libraries allowing to write Windows console or GUI applications that make
use of significant parts of the POSIX API.
Cygwin allows easy porting of many
Unix programs without the need for extensive changes to the source code.
includes configuring and building most of the available GNU or BSD software,
including the packages included with the Cygwin distribution themselves.
They can be used from one of the provided Unix shells like bash, tcsh or zsh.
1.2.What versions of Windows are supported?Cygwin can be expected to run on all modern, released versions of Windows.
State January 2016 this includes Windows Vista, Windows Server 2008 and all
later versions of Windows up to Windows 10 and Windows Server 2016.
The 32 bit version of Cygwin also runs in the WOW64 32 bit environment on
released 64 bit versions of Windows, the 64 bit version of course only on
64 bit Windows.
Keep in mind that Cygwin can only do as much as the underlying OS
Because of this, Cygwin will behave differently, and
exhibit different limitations, on the various versions of Windows.
1.3.Where can I get it?The home page for the Cygwin project is
There you should find everything you need for Cygwin, including links
for download and setup, a current list of mirror sites, a User's
Guide, an API Reference, mailing lists and archives.
You can find documentation for the individual GNU tools typically
as man pages or info pages as part of the Cygwin net distribution.
Additionally you can get the latest docs at
1.4.Is it free software?Yes.
Parts are GNU software (gcc, gas, ld, etc...), parts are covered
by the standard X11 license, some of it is public domain, some of
it was written by Red Hat (or the former Cygnus Solutions) and placed under
None of it is shareware.
You don't have to pay anyone to use it
but you should be sure to read the copyright section of the FAQ for more
information on how the GNU General Public License may affect your use of
these tools.
Note that when we say "free" we mean freedom, not price.
The goal of
such freedom is that the people who use a given piece of software
should be able to change it to fit their needs, learn from it, share
it with their friends, etc.
The GPL or LGPL licenses allows you those
freedoms, so it is free software.
1.5.What version of Cygwin is this, anyway?To find the version of the Cygwin DLL installed, you can use
uname as on Linux or cygcheck. Refer to each command's
--help output and the
for more information.
If you are looking for the version number for the whole Cygwin
release, there is none. Each package in the Cygwin release has its own
The packages in Cygwin are continually improving, thanks to
the efforts of net volunteers who maintain the Cygwin binary ports.
Each package has its own version numbers and its own release process.
So, how do you get the most up-to-date version of Cygwin?
download the Cygwin Setup program by following the instructions
The setup program will handle the task of updating the packages on your system
to the latest version. For more information about using Cygwin's
setup.exe, see
in the Cygwin User's Guide.
1.6.Who's behind the project?(Please note that if you have cygwin-specific
questions, all of these people will appreciate it if you use the cygwin
mailing lists rather than sending personal email.)
Corinna Vinschen is the current project lead. Corinna is a senior Red Hat
engineer. Corinna is responsible for the Cygwin library and maintains a couple
of packages, for instance OpenSSH, OpenSSL, and a lot more.
Yaakov Selkowitz is another Red Hat engineer working on the Cygwin project.
He's the guy behind the current build and packaging system and maintains by
far the most packages in the Cygwin distribution.
Jon Turney is developer and maintainer of the Cygwin X server and a couple
of related packages.
The packages in the Net release are maintained by a l
a complete list can be found
Please note that all of us working on Cygwin try to be as responsive as
possible and deal with patches and questions as we get them, but realistically
we don't have time to answer all of the email that is sent to the main mailing
Making Net releases of the Win32 tools and helping people on the Net out
is not our primary job function, so some email will have to go unanswered.
Many thanks to everyone using the tools for their many contributions in
the form of advice, bug reports, and code fixes.
Keep them coming!
2. Setting up Cygwin2.1. 2.2. 2.3. 2.4. 2.5. 2.6. 2.7. 2.8. 2.9. 2.10. 2.11. 2.12. 2.13. 2.14. 2.15. 2.16. 2.17. 2.18. 2.19. 2.20. 2.21. 2.22. 2.23. 2.24. 2.1.What is the recommended installation procedure?There is only one recommended way to install Cygwin, which is to use the GUI
installer setup-*.exe.
It is flexible and easy to use.
You can pick and choose the packages you wish to install, and update
them individually.
Full source code is available for all packages and
More information on using Cygwin Setup may be found at
If you do it any other way, you're on your own!
If something doesn't work right for you, and
it's not covered here or in the latest development snapshot at
, then by all means report it to the
mailing list.
For a searchable list of packages that can be installed with Cygwin,
2.2.What about an automated Cygwin installation?The Cygwin Setup program is designed to be interactive, but there are
a few different ways to automate it. If you are deploying to multiple systems,
the best way is to run through a full installation once, saving the entire
downloaded package tree. Then, on target systems, run Cygwin Setup as a
"Local Install" pointed at your downloaded package tree. You could do this
non-interactively with the command line options
-q -L -l x:\cygwin-local\, where your downloaded
package tree is in x:\cygwin-local\ (see the next FAQ for
an explanation of those options.)
For other options, search the mailing lists with terms such as
2.3.Does Setup accept command-line arguments?Yes, run setup-x86.exe --help or
setup-x86_64.exe --help for a list.
--allow-unsupported-windows
Allow old, unsupported Windows versions
architecture to install (x86_64 or x86)
-C --categories
Specify entire categories to install
-o --delete-orphans
remove orphaned packages
-A --disable-buggy-antivirus
Disable known or suspected buggy anti virus
software packages during execution.
-D --download
Download from internet
-f --force-current
select the current version for all packages
print help
-I --include-source
Automatically include source download
-i --ini-basename
Use a different basename, e.g. "foo",
instead of "setup"
-U --keep-untrusted-keys
Use untrusted keys and retain all
-L --local-install
Install from local directory
-l --local-package-dir
Local package directory
-m --mirror-mode
Skip availability check when installing from
local directory (requires local directory to
be clean mirror!)
-B --no-admin
Do not check for and enforce running as
Administrator
-d --no-desktop
Disable creation of desktop shortcut
-r --no-replaceonreboot
Disable replacing in-use files on next
-n --no-shortcuts
Disable creation of desktop and start menu
-N --no-startmenu
Disable creation of start menu shortcut
-X --no-verify
Don't verify setup.ini signatures
-O --only-site
Ignore all sites except for -s
-M --package-manager
Semi-attended chooser-only mode
-P --packages
Specify packages to install
-p --proxy
HTTP/FTP proxy (host:port)
-Y --prune-install
prune the installation to only the requested
-K --pubkey
URL of extra public key file (gpg format)
-q --quiet-mode
Unattended setup mode
-c --remove-categories
Specify categories to uninstall
-x --remove-packages
Specify packages to uninstall
Root installation directory
-S --sexpr-pubkey
Extra public key in s-expr format
Download site
-u --untrusted-keys
Use untrusted keys from last-extrakeys
-g --upgrade-also
also upgrade installed packages
--user-agent
User agent string for HTTP requests
-v --verbose
Verbose output
When elevating, wait for elevated child
2.4.Can I install Cygwin without administrator rights?Yes.
The default installation requests administrator rights because
this allows to set up the Cygwin environment so that all users can start
a Cygwin shell out of the box.
However, if you don't have administrator
rights for your machine, and the admins don't want to install it for you,
you can install Cygwin just for yourself by downloading
setup-x86.exe (for a 32 bit install) or
setup-x86_64.exe (for a 64 bit install) and then start
it from the command line or via the "Run..." dialog from the start menu
using the --no-admin option, for instance:
setup-x86.exe --no-admin
2.5.Why not install in C:\?The Cygwin Setup program will prompt you for a "root" directory.
The default is C:\cygwin, but you can change it.
You are urged not to
choose something like C:\ (the root directory on the system drive) for
your Cygwin root.
If you do, then critical Cygwin system directories
like etc, lib and bin could easily be corrupted by
other (non-Cygwin) applications or packages that use \etc,
\lib or \bin.
Perhaps there is no conflict now, but who
knows what you might install in the future?
It's also just good common
sense to segregate your Cygwin "filesystems" from the rest of your
Windows system disk.
(In the past, there had been genuine bugs that would cause problems
for people who installed in C:\, but we believe those are gone
2.6.Can I use Cygwin Setup to get old versions of packages (like gcc-2.95)?Cygwin Setup can be used to install any packages that are on a
Cygwin mirror, which usually includes one version previous to the
current one. The complete list may be searched at
There is no complete archive of
older packages. If you have a problem with the current version of
a Cygwin package, please report it to the mailing list using the
guidelines at .
That said, if you really need an older package, you may be able to find
an outdated or archival mirror by searching the web for an old package
version (for example, gcc2-2.95.3-10-src.tar.bz2), but keep in
mind that this older version will not be supported by the mailing list
and that installing the older version will not help improve Cygwin.
2.7.How does Cygwin secure the installation and update process?
Here is how Cygwin secures the installation and update process to counter
The Cygwin website provides the setup program
(setup-x86.exe or setup-x86_64.exe)
using HTTPS (SSL/TLS).
This authenticates that the setup program
came from the Cygwin website
(users simply use their web browsers to download the setup program).
You can use tools like Qualsys' SSL Server Test,
to check the HTTPS configuration of Cygwin.
The cygwin.com site supports HTTP Strict Transport Security (HSTS),
which forces the browser to keep using HTTPS once the browser has seen
it before (this counters many downgrade attacks).
The setup program has the
Cygwin public key embedded in it.
The Cygwin public key is protected from attacker subversion
during transmission by the previous step, and this public
key is then used to protect all later steps.
You can confirm that the key is in setup by looking at the setup project
source code file cyg-pubkey.h
(the key is automatically generated from file cygwin.pub).
The setup program downloads
the package list setup.ini from a mirror
and checks its digital signature.
The package list is in the file
setup.bz2 (compressed) or
setup.ini (uncompressed) on the selected mirror.
The package list includes for every official Cygwin package
the package name, cryptographic hash, and length (in bytes).
The setup program also gets the relevant .sig
(signature) file for that package list, and checks that the package list
is properly signed with the Cygwin public key embedded in the setup program.
A mirror could corrupt the package list and/or signature, but this
would be detected by setup program's signature detection
(unless you use the -X option to disable signature checking).
The setup program also checks the package list
timestamp/version and reports to the user if the file
go that process detects downgrade attacks
(e.g., where an attacker subverts a mirror to send a signed package list
that is older than the currently-downloaded version).
The packages to be installed
(which may be updates) are downloaded and both their
lengths and cryptographic hashes
(from the signed setup.{bz2,ini} file) are checked.
Non-matching packages are rejected, countering any attacker's
attempt to subvert the files on a mirror.
Cygwin currently uses the cryptographic hash function SHA-512
for the setup.ini files.
Cygwin uses the cryptographic hash algorithm SHA-512 as of .
The earlier
update of the setup program added support for SHA-512
(Cygwin previously used MD5).
There are no known practical exploits of SHA-512 (SHA-512 is part of the
widely-used SHA-2 suite of cryptographic hashes).
2.8.What else can I do to ensure that my installation and updates are secure?
To best secure your installation and update process, download
the setup program setup-x86.exe (32-bit) or
setup-x86_64.exe (64-bit), and then
check its signature (using a signature-checking tool you trust)
using the Cygwin public key
This was noted on the front page for installing and updating.
If you use the actual Cygwin public key, and have an existing secure
signature-checking process, you will counter many other
attacks such as subversion of the Cygwin website and
malicious certificates issued by untrustworthy certificate authorities (CAs).
One challenge, of course, is ensuring that
you have the actual Cygwin public key.
You can increase confidence in the Cygwin public key by checking older copies
of the Cygwin public key (to see if it's been the same over time).
Another challenge is having a secure signature-checking process.
You can use GnuPG if you have a trusted Cygwin
installation you can install GnuPG.
Otherwise, to check the signature you must use an existing trusted tool or
install a signature-checking tool you can trust.
Not everyone will go through this additional effort,
but we make it possible for those who want that extra confidence.
We also provide automatic mechanisms
(such as our use of HTTPS) for those with limited time and
do not want to perform the signature checking on the setup program itself.
Once the correct setup program is running, it will counter other attacks
as described in
2.9.Is Cygwin Setup, or one of the packages, infected with a virus?Unlikely.
Unless you can confirm it, please don't report it to the
mailing list.
Anti-virus products have been known to detect false
positives when extracting compressed tar archives.
If this causes
problems for you, consider disabling your anti-virus software when
running setup.
Read the next entry for a fairly safe way to do
2.10.My computer hangs when I run Cygwin Setup!Both Network Associates (formerly McAfee) and Norton anti-virus
products have been reported to "hang" when extracting Cygwin tar
If this happens to you, consider disabling your anti-virus
software when running Cygwin Setup.
The following procedure should be
a fairly safe way to do that:
Download setup-x86.exe or
setup-x86_64.exe and scan it explicitly.
Turn off the anti-virus software.
Run setup to download and extract all the tar files.
Re-activate your anti-virus software and scan everything
in C:\cygwin (or wherever you chose to install), or your entire hard
disk if you are paranoid.
This should be safe, but only if Cygwin Setup is not substituted by
something malicious.
for a description of how the
Cygwin project counters man-in-the-middle (MITM) attacks.
for a list of applications that have been known, at one time or another, to
interfere with the normal functioning of Cygwin.
2.11.What packages should I download? Where are 'make', 'gcc', 'vi', etc?
When using Cygwin Setup for the first time, the default is to install
a minimal subset of all available packages.
If you want anything beyond that,
you will have to select it explicitly.
for a searchable list of available
packages, or use cygcheck -p
as described in the Cygwin
User's Guide at
If you want to build programs, of course you'll need gcc,
binutils, make and probably other packages from the
``Devel'' category. Text editors can be found under ``Editors''.
2.12.How do I just get everything?Long ago, the default was to install everything, much to the
irritation of most users.
Now the default is to install only a basic
core of packages.
Cygwin Setup is designed to make it easy to browse
categories and select what you want to install or omit from those
categories.
It's also easy to install everything:
At the ``Select Packages'' screen, in ``Categories'' view, at the line
marked ``All'', click on the word ``default'' so that it changes to
``install''.
(Be patient, there is some computing to do at this step.
It may take a second or two to register the change.)
This tells Setup
to install everything, not just what it thinks you should have
by default.
Now click on the ``View'' button (twice) until you get to the
``Pending'' view.
This shows exactly which packages are about to be
downloaded and installed.
This procedure only works for packages that are currently available.
There is no way to tell Cygwin Setup to install all packages by
default from now on.
As new packages become available that would not
be installed by default, you have to repeat the above procedure to get
In general, a better method (in my opinion), is to:
First download & install all packages that would normally be
installed by default.
This includes fundamental packages and any
updates to what you have already installed.
Run Cygwin Setup again, and apply the above technique to get all
new packages that would not be installed by default.
You can check
the list in the ``Pending'' view before proceeding, in case there's
something you really don't want.
In the latest version of Cygwin Setup, if you click the ``View''
button (twice) more, it shows packages not currently installed.
ought to check whether you really want to install everything!
2.13.How much disk space does Cygwin require?That depends, obviously, on what you've chosen to download and
A full installation today is probably larger than 1 GB
installed, not including the package archives themselves nor the source
After installation, the package archives remain in your ``Local
Package Directory''.
By default the location of
setup-x86{_64}.exe.
You may conserve disk space by
deleting the subdirectories there.
These directories will have very weird
looking names, being encoded with their URLs
(named ftp%3a%2f...).
Of course, you can keep them around in case you want to reinstall a
package. If you want to clean out only the outdated packages, Michael Chase
has written a script called clean_setup.pl, available
at unsupported/clean_setup.pl in a Cygwin mirror.
2.14.How do I know which version I upgraded from?Detailed logs of the most recent Cygwin Setup session can be found in
/var/log/setup.log.full and less verbose information about
prior actions is in /var/log/setup.log.
2.15.What if setup fails?First, make sure that you are using the latest version of Cygwin Setup.
The latest version is always available from the Cygwin Home Page at
If you are downloading from the Internet, setup will fail if it cannot
download the list of mirrors at .
It could be that the network is too busy.
Something similar could be the
cause of a download site not working.
Try another mirror, or try again
If setup refuses to download a package that you know needs to be
upgraded, try deleting that package's entry from /etc/setup.
If you are
reacting quickly to an announcement on the mailing list, it could be
that the mirror you are using doesn't have the latest copy yet.
another mirror, or try again tomorrow.
If setup has otherwise behaved strangely, check the files
setup.log and setup.log.full in
/var/log (C:\cygwin\var\log by
It may provide some clues as to what went wrong and why.
If you're still baffled, search the Cygwin mailing list for clues.
Others may have the same problem, and a solution may be posted there.
If that search proves fruitless, send a query to the Cygwin mailing
You must provide complete details in your query: version of
setup, options you selected, contents of setup.log and setup.log.full,
what happened that wasn't supposed to happen, etc.
2.16.My Windows logon name has a space in it, will this cause problems?Most definitely yes!
UNIX shells (and thus Cygwin) use the space
character as a word delimiter.
Under certain circumstances, it is
possible to get around this with various shell quoting mechanisms, but
you are much better off if you can avoid the problem entirely.
You have two choices:
You can rename the user in the Windows User Manager GUI.
If that's not possible, you can create an /etc/passwd file
using the mkpasswd command.
Then you can simply edit your
Cygwin user name (first field). It's also a good idea to avoid spaces in the
home directory.
2.17.My HOME environment variable is not what I want.When starting Cygwin from Windows, HOME is determined
as follows:
If HOME is set in the Windows environment,
translated to POSIX form.
Otherwise, use the pw_home field from the passwd entry as
returned by getent passwd.
If you want to learn how this
field is set by Cygwin and how you can change it, this is explained in great
detail in the Cygwin User's Guide at
When using Cygwin from a network login (via ssh for instance),
HOME is always taken from the passwd entry.
If your HOME is set to a value such as /cygdrive/c,
it is likely that it was set in Windows. Start a DOS Command Window and type
"set HOME" to verify if this is the case.
Access to shared drives is often restricted when starting from the
network, thus Domain users may wish to have a different HOME
in the Windows environment (on shared drive) than in Cygwin (on local drive).
Note that ssh only considers the account information as retrieved by
getpwnam(3), disregarding HOME.
2.18.How do I uninstall individual packages?Run Cygwin Setup as you would to install packages.
In the list of
packages to install, browse the relevant category or click on the
``View'' button to get a full listing.
Click on the cycle glyph until
the action reads ``Uninstall''.
Proceed by clicking ``Next''.
2.19.How do I uninstall a Cygwin service?List all services you have installed with
cygrunsrv -L. If you do not have
cygrunsrv installed, skip this FAQ.
Before removing the service, you should stop it with
cygrunsrv --stop service_name.
If you have inetd configured to run as a standalone
service, it will not show up in the list, but
cygrunsrv --stop inetd will work to stop it as
Lastly, remove the service with
cygrunsrv --remove service_name.
2.20.How do I uninstall all of Cygwin?Setup has no automatic uninstall facility.
The recommended method to remove all
of Cygwin is as follows:
If you have any Cygwin services running, remove by repeating
the instructions in
all services that you installed.
Common services that might have been
installed are sshd, cron,
cygserver, inetd, apache,
postgresql, and so on.
Stop the X11 server if it is running, and terminate any Cygwin programs
that might be running in the background.
Exit the command prompt and ensure
that no Cygwin processes remain.
Note: If you want to save your mount points for a later
reinstall, first save the output of mount -m as described at
If you installed cyglsa.dll by running the
shell script /usr/bin/cyglsa-config as described in
, then you need to
configure Windows to stop using the LSA authentication package.
You do so by
editing the registry and restoring
/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Lsa/Authentication Packages
back to it's original value of msv1_0, and then rebooting.
Delete the Cygwin root folder and all subfolders.
If you get
an error that an object is in use, then ensure that you've stopped all services
and closed all Cygwin programs.
If you get a 'Permission Denied' error then
you will need to modify the permissions and/or ownership of the files or
folders that are causing the error.
For example, sometimes files used by
system services end up owned by the SYSTEM account and not writable by regular
users.The quickest way to delete the entire tree if you run into this problem
is to take ownership of all files and folders to your account.
this in Windows Explorer, right click on the root Cygwin folder, choose
Properties, then the Security tab.
If you are using Simple File Sharing, you
will need to boot into Safe Mode to access the Security tab.
Select Advanced,
then go to the Owner tab and make sure your account is listed as the owner.
Select the 'Replace owner on subcontainers and objects' checkbox and press Ok.
After Explorer applies the changes you should be able to delete the entire tree
in one operation.
Note that you can also achieve by using other tools such as
icacls.exe or directly from Cygwin by using
Please note that you shouldn't use the
recursive form of chown on directories that have other file systems
mounted under them (specifically you must avoid
/proc) since you'd change ownership of the files under those
mount points as well.
Delete the Cygwin shortcuts on the Desktop and Start Menu, and
anything left by setup-x86{_64}.exe in the download directory.
However, if you
plan to reinstall Cygwin it's a good idea to keep your setup-x86{_64}.exe
download directory since you can reinstall the packages left in its cache
without redownloading them.
If you added Cygwin to your system path, you should remove it unless you
plan to reinstall Cygwin to the same location.
Similarly, if you set your
CYGWIN environment variable system-wide and don't plan to reinstall, you should
remove it.
Finally, if you want to be thorough you can delete the registry tree
Software\Cygwin under HKEY_LOCAL_MACHINE and/or
HKEY_CURRENT_USER.
However, if you followed the directions above you
will have already removed everything important.
Typically only the installation
directory has been stored in the registry at all.
2.21.How do I install snapshots?First, are you sure you want to do this?
Snapshots are risky.
have not been tested.
Use them only if there is a feature or
bugfix that you need to try, and you are willing to deal with any
problems, or at the request of a Cygwin developer.
You cannot use Cygwin Setup to install a snapshot.
First, you will need to download the snapshot from the snapshots
Note the directory where
you saved the snapshot tarball.
Before installing a snapshot, you must first Close all Cygwin
applications, including shells and services (e.g., inetd, sshd).
You will not be able to replace cygwin1.dll if any Cygwin process is
You may have to restart Windows to clear the DLL from memory
(beware of automatic service startup).
Most of the downloaded snapshot can be installed using tar.
tar won't be able to update /usr/bin/cygwin1.dll (because it's
used by tar itself), but it should succeed with everything else.
you are only installing the DLL snapshot, skip the first tar command.
a bash shell (it should be the only running Cygwin process) and issue
the following commands:
/bin/tar -C / -xvf /posix/path/to/cygwin-inst-YYYYMMDD.tar.* --exclude=usr/bin/cygwin1.dll
/bin/tar -C /tmp -xvf /posix/path/to/cygwin-inst-YYYYMMDD.tar.* usr/bin/cygwin1.dll
Exit the bash shell, and use Explorer or the Windows command shell to
first rename C:\cygwin\bin\cygwin1.dll to
C:\cygwin\bin\cygwin1-prev.dll and then move
C:\cygwin\tmp\usr\bin\cygwin1.dll
to C:\cygwin\bin\cygwin1.dll (assuming you installed Cygwin in
C:\cygwin).
The operative word in trying the snapshots is "trying".
notice a problem with the snapshot that was not present in the release
DLL (what we call a "regression"), please report it to the Cygwin
mailing list (see
for problem
reporting guidelines).
If you wish to go back to the older version of the
DLL, again, close all Cygwin processes, delete
C:\cygwin\bin\cygwin1.dll, and
rename C:\cygwin\bin\cygwin1-prev.dll back to
C:\cygwin\bin\cygwin1.dll (again assuming that your "/" is
C:\cygwin).
To restore the rest of the snapshot
files, reinstall the "cygwin" package using Setup.
2.22.Can Cygwin Setup maintain a ``mirror''?NO.
Cygwin Setup cannot do this for you.
Use a tool designed for
this purpose.
for utilities that can do this for you.
For more information on setting up a custom Cygwin package server, see
the Cygwin Setup homepage at
2.23.How can I make my own portable Cygwin on CD?While some users have successfully done this, for example Indiana
University's XLiveCD , there is no
easy way to do it. Full instructions for constructing a portable Cygwin
on CD by hand can be found on the mailing list at
(Thanks to fergus at bonhard dot uklinux dot net for these instructions.)
Please note that these instructions are very old and are referring to the
somewhat different setup of a Cygwin 1.5.x release.
As soon as somebody set
this up for recent Cygwin releases, we might add this information here.
2.24.How do I save, restore, delete, or modify the Cygwin information stored in the registry?Cygwin doesn't store anything important in the registry anymore for
quite some time.
There's no reason to save, restore or delete it.
3. Further Resources3.1. 3.2. 3.3. 3.1.Where's the documentation?If you have installed Cygwin, you can find lots of documentation in
/usr/share/doc/.
Some packages have Cygwin specific
instructions in a file
/usr/share/doc/Cygwin/package_name.README.
In addition, many packages ship with standard documentation, which you can
/usr/share/doc/package_name or
by using the man or info tools. (Hint:
use cygcheck -l package_name to
list what man pages the package includes.)
Some older packages still keep
their documentation in /usr/doc/
instead of /usr/share/doc/.
There are links to quite a lot of documentation on the main Cygwin
project web page, , including this FAQ.
Be sure to at least read any 'Release Notes' or 'Readme' or 'read this'
links on the main web page, if there are any.
There is a comprehensive Cygwin User's Guide at
and an API Reference at
You can find documentation for the individual GNU tools at
3.2.What Cygwin mailing lists can I join?Comprehensive information about the Cygwin mailing lists can be found at
3.3.What if I have a problem? (Or: Why won't you/the mailing list answer my questions?)Comprehensive information about reporting problems with Cygwin can be found at .
4. Using Cygwin4.1. 4.2. 4.3. 4.4. 4.5. 4.6. 4.7. 4.8. 4.9. 4.10. 4.11. 4.12. 4.13. 4.14. 4.15. 4.16. 4.17. 4.18. 4.19. 4.20. 4.21. 4.22. 4.23. 4.24. 4.25. 4.26. 4.27. 4.28. 4.29. 4.30. 4.31. 4.32. 4.33. 4.34. 4.35. 4.36. 4.37. 4.38. 4.39. 4.40. 4.41. 4.42. 4.43. 4.44. 4.45. 4.46. 4.1.Why can't my application locate cygncurses-8.dll?
or cygintl-3.dll?
or cygreadline6.dll?
or ...?Well, something has gone wrong somehow...
To repair the damage, you must run Cygwin Setup again, and re-install the
package which provides the missing DLL package.
If you already installed the package at one point, Cygwin Setup won't
show the option to install the package by default.
``Select packages to install'' dialog, click on the Full/Part
This lists all packages, even those that are already
installed.
Scroll down to locate the missing package, for instance
libncurses8.
Click on the ``cycle'' glyph until it says
``Reinstall''.
Continue with the installation.
For a detailed explanation of the general problem, and how to extend
it to other missing DLLs and identify their containing packages, see
4.2.Starting a new terminal window is slow. What's going on?There are many possible causes for this.If your terminal windows suddenly began starting slowly after a
Cygwin upgrade, it may indicate issues in the authentication
setup.For almost all its lifetime, Cygwin has used Unix-like
/etc/passwd and /etc/group
files to mirror the contents of the Windows SAM and AD databases.
Although these files can still be used, since Cygwin 1.7.34, new
installations now use the SAM/AD databases directly.To switch to the new method, move these two files out of the way
and restart the Cygwin terminal. That runs Cygwin in its new default
mode.If you are on a system that isn't using AD domain logins, this
makes Cygwin use the native Windows SAM database directly, which may be
faster than the old method involving /etc/passwd
and such. At worst, it will only be a bit slower. (The speed difference
you see depends on which benchmark you run.) For the AD case, it can be
slower than the old method, since it is trading a local file read for a
network request. Version 1.7.35 will reduce the number of AD server
requests the DLL makes relative to 1.7.34, with the consequence that you
will now have to alter /etc/nsswitch.conf in order
to change your Cygwin home directory, instead of being able to change it
from the AD configuration.If you are still experiencing very slow shell startups, there are
a number of other things you can look into:One common cause of slow Cygwin Terminal starts is a bad DNS
setup. This particularly affects AD clients, but there may be other
things in your Cygwin startup that depend on getting fast answers
back from a network server.Keep in mind that this may affect Cygwin even when the domain
controller is on the same machine as Cygwin, or is on a nearby
server. A bad DNS server IP can cause long delays while the local
TCP/IP stack times out on a connection to a server that simply isn't
there, for example.Another cause for AD client system is slow DC replies,
commonly observed in configurations with remote DC access. The
Cygwin DLL queries information about every group you're in to
populate the local cache on startup. You may speed up this process a
little by caching your own information in local files. Run these
commands in a Cygwin terminal with write access to
/etc:getent passwd $(id -u) & /etc/passwd
getent group $(id -G) & /etc/groupAlso, set /etc/nsswitch.conf as
follows:passwd: files db
files dbThis will limit the need for Cygwin to contact the AD domain
controller (DC) while still allowing for additional information to
be retrieved from DC, such as when listing remote
directories.Either in addition to the previous item or instead of it, you
as a local caching service to speed up DC requests.Cygwin programs will check with cygserver
before trying to query the DC directly.A less preferable option is to create a static read-only cache
of the authentication data. This is the old-fashioned method of
making Cygwin integrate with AD, the only method available in
releases before 1.7.34. To do this, run mkpasswd
and mkgroup, then put the following into
/etc/nsswitch.conf to make Cygwin treat these
files as the only sources of user and group information:passwd: files
filesBy leaving out the db option,
we are telling the Cygwin DLL not to even try to do AD lookups. If
your AD servers are slow, this local cache will speed things up. The
downside is that you open yourself up to the : any time the AD databases change, your local cache
will go out of date until you update the files manually.If none of the above helps, the best troubleshooting method is to
run your startup scripts in debug mode. Right-click your Cygwin Terminal
icon, go to Properties, and edit the command. It should be something
like C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico
Assuming you are using Bash for your login shell, change
it to C:\cygwin\bin\mintty /bin/bash -lx then try
running Cygwin Terminal again. The -x option tells Bash
to write every command it runs to the terminal before launching it. If
the terminal immediately starts filling with lines of text but then
pauses, the line where the output paused is your clue as to what's going
on. The Cygwin DLL proper probably isn't the cause of the slowdown in
this case, since those delays happen before the first line of text
appears in the terminal.4.3.Why is Cygwin suddenly so slow?If suddenly every command takes a
very long time, then something is probably attempting to
access a network share.
You may have the obsolete //c
notation in your PATH or startup files.
Using //c means
to contact the network server c, which
will slow things down tremendously if it does not exist.
4.4.Why can't my services access network shares?If your service is one of those which switch the user context
(sshd, inetd, etc), then it depends on the method used to switch to
another user.
This problem as well as its solution is described in
detail in the Cygwin User's Guide, see
Workarounds include using public network share that does not require
authentication (for non-critical files), providing your password to a
net use command, or running the service as your own
user with cygrunsrv -u (see
/usr/share/doc/Cygwin/cygrunsrv.README for more
information).
4.5.How should I set my PATH?This is done for you in the file /etc/profile, which is sourced by bash
when you start it from the Desktop or Start Menu shortcut, created by
setup.exe.
The line is
PATH="/usr/local/bin:/usr/bin:/bin:$PATH"
Effectively, this prepends /usr/local/bin and /usr/bin to your
Windows system path.
If you choose to reset your PATH, say in
$HOME/.bashrc, or by editing etc/profile directly, then you should
follow this rule.
You must have /usr/bin in your PATH
before any Windows system directories.
(And you must not omit
the Windows system directories!)
Otherwise you will likely encounter
all sorts of problems running Cygwin applications.
If you're using another shell than bash (say, tcsh), the mechanism
is the same, just the names of the login scripts are different.
4.6.Bash (or another shell) says "command not found", but it's right there!If you compile a program, you might find that you can't run it:
bash$ gcc -o hello hello.c
bash$ hello
bash: hello: command not found
Unlike the Windows default behaviour, Unix shells like bash do not look for programs in . (the current
directory) by default.
You can add . to your PATH (see above),
but this is not recommended (at least on UNIX) for security reasons.
Just tell bash where to find it, when you type it on the command line:
bash$ gcc -o hello hello.c
bash$ ./hello
Hello World!
4.7.How do I convert between Windows and UNIX paths?Use the 'cygpath' utility.
Type 'cygpath --help' for
information.
For example (on my installation):
bash$ cygpath --windows ~/.bashrc
D:\starksb\.bashrc
bash$ cygpath --unix C:/cygwin/bin/ls.exe
/usr/bin/ls.exe
bash$ cygpath --unix C:\\cygwin\\bin\\ls.exe
/usr/bin/ls.exe
Note that bash interprets the backslash '\' as an escape character, so
you must type it twice in the bash shell if you want it to be recognized
4.8.Why doesn't bash read my .bashrc file on startup?Your .bashrc is read from your home directory specified by the HOME
environment variable.
It uses /.bashrc if HOME is not set.
So you need
to set HOME (and the home dir in your passwd account information) correctly.
4.9.How can I get bash filename completion to be case insensitive?Add the following to your ~/.bashrc file:
shopt -s nocaseglob
and add the following to your ~/.inputrc file:
set completion-ignore-case on
4.10.Can I use paths/filenames containing spaces in them?Cygwin does support spaces in filenames and paths.
That said, some
utilities that use the library may not, since files don't typically
contain spaces in Unix.
If you stumble into problems with this, you
will need to either fix the utilities or stop using spaces in filenames
used by Cygwin tools.
In particular, bash interprets space as a word separator.
You would have
to quote a filename containing spaces, or escape the space character.
For example:
bash-2.03$ cd '/cygdrive/c/Program Files'
bash-2.03$ cd /cygdrive/c/Program\ Files
4.11.Why can't I cd into a shortcut to a directory?Cygwin does not follow MS Windows Explorer Shortcuts
(*.lnk files).
It sees a shortcut as a regular file and this you
cannot "cd" into it.
Cygwin is also capable to create POSIX symlinks as Windows shortcuts
(see the CYGWIN environment variable option "winsymlinks"), but these
shortcuts are different from shortcuts created by native Windows
applications.
Windows applications can usually make use of Cygwin
shortcuts but not vice versa.
This is by choice.
The reason is that
Windows shortcuts may contain a bunch of extra information which would
get lost, if, for example, Cygwin tar archives and extracts them as
Changing a Cygwin shortcut in Windows Explorer usually changes a Cygwin
shortcut into a Windows native shortcut.
Afterwards, Cygwin will not
recognize it as symlink anymore.
4.12.I'm having basic problems with find.
Why?Make sure you are using the find that came with Cygwin and that you
aren't picking up the Win32 find command instead.
You can verify that
you are getting the right one by doing a "type find" in bash.
If the path argument to find, including current directory (default), is
itself a symbolic link, then find will not traverse it unless you
specify the -follow option.
This behavior is different than most
other UNIX implementations, but is not likely to change.
If find does not seem to be producing enough results, or seems to be
missing out some directories, you may be experiencing a problem with one
of find's optimisations.
The absence of . and ..
directories on some filesystems, such as DVD-R UDF, can confuse find.
See the documentation for the option -noleaf in the man page.
4.13.Why doesn't su work?The su command has been in and out of Cygwin distributions, but
it has not been ported to Cygwin and has never worked.
currently installed as part of the sh-utils, but again, it does not work.
You should rather install sshd and use
ssh username@localhost as a su
replacement.
For some technical background into why su doesn't
work, read
related messages.
4.14.Why doesn't man -k,
apropos or whatis work?Before you can use man -k, apropos
or whatis, you
must create the whatis database.
Just run the command
(it may take a few minutes to complete).
4.15.Why doesn't chmod work?If you're using FAT32 instead of NTFS, chmod
will fail since FAT32 does not provide any permission information.
You should really consider converting the drive to NTFS with
CONVERT.EXE.
FAT and FAT32 are barely good enough
for memory cards or USB sticks to exchange pictures...
For other cases, understand that Cygwin attempts to show UNIX
permissions based on the security features of Windows, so the Windows
ACLs are likely the source of your problem.
See the Cygwin User's
for more information on how Cygwin maps Windows permissions.
4.16.Why doesn't my shell script work?There are two basic problems you might run into.
One is the fact that
/bin/sh is really bash.
It could be missing some features you might expect in
/bin/sh, if you are used to /bin/sh
actually being zsh (MacOS X "Panther") or
ksh (Tru64).
Or, it could be a permission problem, and Cygwin doesn't understand
that your script is executable.
On NTFS or NFS just make the script
executable using chmod +x.
chmod may not work due to restrictions of the
filesystem (see FAQ entry above).
In this case Cygwin must read the
contents of files to determine if they are executable.
If your script
does not start with
#! /bin/sh
(or any path to a script interpreter, it does not have to be /bin/sh)
then Cygwin will not know it is an executable script.
The Bourne shell
# This is the 2nd line, assume processing by /bin/sh
also works.
Note that you can use the filesystem flag cygexec in
/etc/fstab to force Cygwin to treat all files
under the mount point as executable.
This can be used for individual
files as well as directories.
Then Cygwin will not bother to read files
to determine whether they are executable.
4.17.How do I print under Cygwin?lpr is available in the cygutils package.
are available courtesy of Rodrigo Medina.
Jason Tishler has written a couple of messages that explain how to use
a2ps (for nicely formatted text in PostScript) and ghostscript (to print
PostScript files on non-PostScript Windows printers).
these are old mails and a2ps as well as
file are long available as part of the Cygwin distribution.
Alternatively, you can use the Windows print
bash$ print /\?
for usage instructions (note the ? must be escaped
from the shell).
Finally, you can simply cat the file to the printer's share name:
bash$ cat myfile & //host/printer
You may need to press the formfeed button on your printer or append the
formfeed character to your file.
4.18.Why don't international (Unicode) characters work?Internationalization is a complex issue. The short answer is that
Cygwin relies on the setting of the setting of LANG/LC_xxx environment
variables. The long answer can be found in the User's Guide in the
Cygwin uses UTF-8 by default.
To use a different character set, you
need to set the LC_ALL, LC_CTYPE or LANG environment variables.4.19.My application prints international characters but I only
see gray boxesIn the case of Cygwin programs, this likely means that the
character set as determined by the LC_ALL, LC_CTYPE or LANG environment
variables does not match the one set on the Text page of the Cygwin Terminal's
Setting the locale in the terminal's options will set the LANG
variable accordingly.Non-Cygwin programs in the Cygwin Terminal do not usually take
heed of the locale environment variables.
Instead, they often use the
so-called console codepage, which can be determined with the command
cmd /c chcp followed by the appropriate Windows
codepage number.
The codepage number for Cygwin's default UTF-8 character
set is 65001.4.20.Is it OK to have multiple copies of the DLL?Yes, as long as they are used in strictly separated installations.The Cygwin DLL has to handle various sharing situations between
multiple processes.
It has to keep a process table.
It has to maintain
a mount table which is based on the installation path of the Cygwin DLL.For that reason, the Cygwin DLL maintains shared resources based on
a hash value created from its own installation path.
Each Cygwin DLL
on the machine constitutes a Cygwin installation, with the directory
the Cygwin DLL resides in treated as "/bin", the parent directory as "/".
Therefore, you can install two or more separate Cygwin distros on
a single machine.
Each of these installations use their own Cygwin DLL,
and they don't share the default POSIX paths, nor process tables, nor
any other shared resource used to maintain the installation.However, a clean separation requires that you don't try to run
executables of one Cygwin installation from processes running in another
Cygwin installation.
This may or may not work, but the chances that the
result is not what you expect are pretty high.If you get the error "shared region is corrupted" or "shared region
version mismatch" it means you have multiple versions of cygwin1.dll
running at the same time which conflict with each other.
Apart from
mixing executables of different Cygwin installations, this could also happen
if you have one a single Cygwin installation, for example, if you update the
Cygwin package without exiting all Cygwin apps (including
services like sshd) beforehand.The only DLL that is sanctioned by the Cygwin project is the one that
you get by running ,
installed in a directory controlled by this program.
If you have other
versions on your system and desire help from the cygwin project, you should
delete or rename all DLLs that are not installed by
setup.exe.
If you're trying to find multiple versions of the DLL that are causing
this problem, reboot first, in case DLLs still loaded in memory are the
Then use the Windows System find utility to search your whole
machine, not just components in your PATH (as 'type' would do) or
cygwin-mounted filesystems (as Cygwin 'find' would do).
I read the above but I want to bundle Cygwin with a product, and ship it
to customer sites.
How can I do this without conflicting with any Cygwin
installed by the user?
Usually, if you keep your installation separate, nothing bad should happen.
However, for the user's convenience, and to avoid potential problems which
still can occur, consider to integrate your product with an already existing
Cygwin installation on the user's machine, or, if there is none, consider
to install the official Cygwin distro on behalf of the user and integrate
your tools from there.
(If you write a tool to make this easy, consider
contributing it for others to use)
Can I bundle Cygwin with my product for free?
Starting with Cygwin version 2.5.2, which is LGPL licensed, yes, albeit
it's not recommended for interoperability reasons.Cygwin versions prior to 2.5.2 were GPL licensed.
If you choose to distribute an older cygwin1.dll, you must be willing to
distribute the exact source code used to build that copy of cygwin1.dll
as per the terms of the GPL.
If you ship applications that link with
older cygwin1.dll, you must provide those applications' source code
under a GPL-compatible license.
But doesn't that mean that if some application installs an older Cygwin
DLL on top of a newer DLL, my application will break?
It depends on what you mean by "break".
If the application installs a
version of the Cygwin DLL in another location than Cygwin's /bin
directory then the rules in
If the application installs an older version of the DLL in /bin then you
should complain loudly to the application provider.
Remember that the Cygwin DLL strives to be backwards compatible so a
newer version of the DLL should always work with older executables.
in general, it is always best to keep one version of the DLL on your
system and it should always be the latest version which matches your
installed distribution.
4.24.Why isn't package XYZ available in Cygwin?Probably because there is nobody willing or able to maintain it.
takes time, and the priority for the Cygwin Team is the Cygwin package.
The rest is a volunteer effort.
Want to contribute?
4.25.Why is the Cygwin package of XYZ so out of date?(Also: Why is the version of package XYZ older than the version that I
can download from the XYZ web site?
Why is the version of package XYZ
older than the version that I installed on my linux system?
something special about Cygwin which requires that only an older version
of package XYZ will work on it?)
Every package in the Cygwin distribution has a maintainer who is
responsible for sending out updates of the package.
This person is a
volunteer who is rarely the same person as the official developer of the
If you notice that a version of a package seems to be out of
date, the reason is usually pretty simple -- the person who is
maintaining the package hasn't gotten around to updating it yet. Rarely,
the newer package actually requires complex changes that the maintainer
is working out.
If you urgently need an update, sending a polite message to the cygwin
mailing list pinging the maintainer is perfectly acceptable.
no guarantees that the maintainer will have time to update the package
or that you'll receive a response to your request, however.
Remember that the operative term here is "volunteer".
4.26.How can I access other drives?You have some flexibility here.
Cygwin has a builtin "cygdrive prefix" for drives that are not mounted.
You can access any drive, say Z:, as '/cygdrive/z/'.
In some applications (notably bash), you can use the familiar windows
&drive&:/path/, using posix forward-slashes ('/') instead of Windows
backward-slashes ('\').
(But see the warning below!)
This maps in the
obvious way to the Windows path, but will be converted internally to use
the Cygwin path, following mounts (default or explicit).
For example:
bash$ cd C:/Windows
/cygdrive/c/Windows
bash$ cd C:/cygwin
for a default setup.
You could also use backward-slashes in the
Windows path, but these would have to be escaped from the shell.
Warning: There is some ambiguity in going from a Windows path
to the posix path, because different posix paths, through different
mount points, could map to the same Windows directory.
This matters
because different mount points may be binmode or textmode, so the
behavior of Cygwin apps will vary depending on the posix path used to
get there.
You can avoid the ambiguity of Windows paths, and avoid typing
"/cygdrive", by explicitly mounting drives to posix paths.
For example:
bash$ mkdir /c
bash$ mount c:/ /c
bash$ ls /c
Then /cygdrive/c/Windows becomes /c/Windows which is a
little less typing.
Note that you have to enter the mount point into the
/etc/fstab file to keep it indefinitely.
The mount command will only add the mount point for the lifetime
of your current Cygwin session.
You can change the default cygdrive prefix and whether it is binmode or textmode using the /etc/fstab file
See the Cygwin User's Guide at
for more details.
4.27.How can I copy and paste into Cygwin console windows?First, consider using mintty instead of the standard console
In mintty, selecting with the left-mouse also copies,
and middle-mouse pastes.
It couldn't be easier!
In Windows's console window, open the properties dialog.
The options contain a toggle button, named "Quick edit mode".
Save the properties.
You can also bind the insert key to paste from the clipboard by adding
the following line to your .inputrc file:
"\e[2~": paste-from-clipboard
4.28.What firewall should I use with Cygwin? We have had good reports about Kerio Personal Firewall, ZoneLabs
Integrity Desktop, and the Windows built-in firewall. Other well-known
products including ZoneAlarm and Norton Internet Security have caused
problems for some users but work fine for others. At last report,
Agnitum Outpost did not work with Cygwin.
If you are having strange
connection-related problems, disabling the firewall is a good
troubleshooting step (as is closing or disabling all other running
applications, especially resource-intensive processes such as indexed
On the whole, Cygwin doesn't care which firewall is used.
The few rare
exceptions have to do with socket code.
Cygwin uses sockets to implement many of its functions, such as IPC.
Some overzealous firewalls install themselves deeply into the winsock
stack (with the 'layered service provider' API) and install hooks
throughout.
Sadly the mailing list archives are littered with examples
of poorly written firewall-type software that causes things to break.
Note that with many of these products, simply disabling the firewall
it must be completely uninstalled.
for a list of applications that have been known, at one time or another, to
interfere with the normal functioning of Cygwin.
4.29.How can I share files between Unix and Windows?During development, we have Linux boxes running Samba and NFS as well
as Windows machines.
We often build with cross-compilers under Linux and copy
binaries and source to the Windows system or just toy with them
directly off the Samba-mounted partition.
Or, we use the Microsoft NFS
client and just use NFS shares on Linux from Windows.
And then there are
tools like scp, ftp,
rsync, ...
4.30.Is Cygwin case-sensitive??Several Unix programs expect to be able to use to filenames
spelled the same way, but with different case.
A prime example
of this is perl's configuration script, which wants
Makefile and makefile.
Windows can't
tell the difference between files with just different case, so the
configuration fails.
To help with this problem, Cygwin supports case sensitivity.
detailed description how to use that feature see the Cygwin User's Guide at
4.31.What about DOS special filenames?In Windows, files cannot be named com1, lpt1, or aux (to name a few);
either as the root filename or as the extension part.
If you do, you'll have
Unix programs don't avoid these names which can make things
interesting.
E.g., the perl distribution has a file called
The perl configuration tries to make sure that
aux.sh is there, but an operation on a file with the magic
letters 'aux' in it will hang.
At least that's what happens when using native Windows tools.
can deal with these filenames just fine.
Again, see the User's Guide at
for a detailed description of what's possible with filenames and what is not.
4.32.When it hangs, how do I get it back?If something goes wrong and the tools hang on you for some reason (easy
to do if you try and read a file called aux.sh), first try hitting ^C to
return to bash or the cmd prompt.
If you start up another shell, and applications don't run, it's a good
bet that the hung process is still running somewhere.
Use the Task
Manager, pview, or a similar utility to kill the process.
And, if all else fails, there's always the reset button/power switch.
In theory this should never be necessary, though.
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
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:\.
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?)
4.34.How do anti-virus programs like Cygwin?Users have reported that NAI (formerly McAfee) VirusScan for NT (and
others?) is incompatible with Cygwin.
This is because it tries to scan
the newly loaded shared memory in cygwin1.dll, which can cause fork() to
fail, wreaking havoc on many of the tools.
(It is not confirmed that
this is still a problem, however.)
There have been several reports of NAI VirusScan causing the system to
hang when unpacking tar.gz archives.
This is surely a bug in VirusScan,
and should be reported to NAI.
The only workaround is to disable
VirusScan when accessing these files.
This can be an issue during
setup, and is discussed in that FAQ entry.
Some users report a significant performance hit using Cygwin when their
anti-virus software is enabled.
Rather than disable the anti-virus
software completely, it may be possible to specify directories whose
contents are exempt from scanning.
In a default installation, this
would be C:\cygwin\bin.
Obviously, this could be
exploited by a hostile non-Cygwin program, so do this at your own risk.
for a list of applications that have been known, at one time or another, to
interfere with the normal functioning of Cygwin.
4.35.Is there a Cygwin port of GNU Emacs?Yes.
Install the emacs package.
This provides everything you
need in order to run GNU emacs in a terminal window.
If you also want
to be able to use the X11
GUI, install the emacs-X11 package.
In either case, you run emacs by
typing 'emacs' or '/usr/bin/emacs'.
4.36.Is there a Cygwin port of XEmacs?Yes.
It can be used in three different modes:X11 () GUIYou have to set the DISPLAY environment variable
before starting xemacs.
bash$ DISPLAY=127.0.0.1:0 xemacs &
Windows native GUIYou have to unset the DISPLAY environment variable
before starting xemacs.
bash$ DISPLAY= xemacs &
Console modeStart xemacs with -nw in a terminal (native or X11) window
bash$ xemacs -nw
To use all the standard packages with XEmacs you should download the following
two packages:xemacs-sumo - XEmacs standard packagesxemacs-mule-sumo - XEmacs MULE (MUlti Lingual Emacs) packages4.37.Why don't some of my old symlinks work anymore?Cygwin supports multiple character sets.
Symlinks created with Cygwin
are using the UTF-16 character set, which is portable across all character
Old symlinks were written using your current Windows codepage, which
is not portable across all character sets.
If the target of the symlink
doesn't resolve anymore, it's very likely that the symlink points to a target
filename using native, non-ASCII characters, and you're now using another
character set than way back when you created the symlink.Solution: Delete the symlink and create it again under you new Cygwin.
The new symlink will be correctly point to the target no matter what character
set you're using in future.4.38.Why don't symlinks work on Samba-mounted filesystems?Symlinks are marked with "system" file attribute.
Samba does not
enable this attribute by default.
To enable it, consult your Samba
documentation and then add these lines to your samba configuration
map system = yes
create mask = 0775
Note that the 0775 can be anything as long as the 0010 bit is set.
Alternatively, use Windows shortcuts as symlinks.
See the CYGWIN
environment variable option "winsymlinks"
4.39.How do I setup sshd in a domain?
If you want to be able to logon with domain accounts to a domain member
machine, you should make sure that the "cyg_server" account under which
the sshd service is usually running, is a domain account.
Otherwise you
might end up with weird problems.
For instance, sshd might fail to load
the child process when trying to login with a domain account.
A potential,
confirmed error message is
*** fatal error - unable to load user32.dll, Win32 error 1114
Here's how you set up a sshd with a domain service account.
First of all, create a new domain account called "cyg_server".
account must be an administrative account, so make sure it's in the
"Administrators" group.
Now create a domain policy which is propagated
to all machines which are supposed to run an sshd service.
This domain
policy should give the following user rights to the "cyg_server" account:
Act as part of the operating system (SeTcbPrivilege)
Create a token object
(SeCreateTokenPrivilege)
Replace a process level token
(SeAssignPrimaryTokenPrivilege)
Now to install sshd on the member machine, logon to that machine as
Make sure the aforementioend global policy has been propagated
to this machine.
Examine the Local Security Policy settings and, if
necessary, call gpupdate.
If everything looks ok, run bash.
Starting with Windows Vista, make
sure you're running bash elevated.
Then run ssh-host-config.
Answer all questions so that "cyg_server" is
used to run the service.
When done, check ownership of
/var/empty and all /etc/ssh*
All of them must be owned by "cyg_server".
If that's ok, you're
usually all set and you can start the sshd service via
$ cygrunsrv -S sshd
$ net start sshd
4.40.Why does public key authentication with ssh fail after updating to Cygwin 1.7.34 or later?
This is the result of fixing a long-standing security problem in Cygwin's
POSIX ACL handling.
IEEE 1003.1e draft 17 defines that the permissions
of secondary user and group entries in an ACL are reflected in the group
permission mask by or'ing the permissions of the file's primary group with
all permissions of secondary users and groups in the ACL.
The background
is that this way the standard POSIX permission bits reflect the fact that
somebody else has additional, otherwise
potentially invisible permissions on the file.
This relatively complex
interface has been defined in order to ensure that applications that are
compliant with IEEE 1003.1 (“POSIX.1”) will still function as expected on
systems with ACLs.So,}

我要回帖

更多关于 汗疱疹用什么药膏 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信