Table of Contents
To install the Cygwin net release, go tohttps://cygwin.com/ and runsetup-x86_64.exeto install the 64 bit version of Cygwin. This will download a GUIinstaller which can be run to download a complete cygwin installationvia the internet. Follow the instructions on each screen to install Cygwin.
Thesetup installer is designed to be easyfor new users to understand while remaining flexible for the experienced. The volunteer development team is constantly workingonsetup; before requesting a new feature,check the wishlist in theGitREADME
. It may already be present in the Git version!
On Windows Vista and later,setup will check bydefault if it runs with administrative privileges and, if not, will try to elevate the process. If you want to avoid this behaviour and installunder an unprivileged account just for your own usage, runsetup with the--no-admin
option.
Since the default value for each option is the logical choice formost installations, you can get a working minimal Cygwin environmentinstalled by simply clicking theNext
buttonat each page. The only exception to this is choosing a Cygwin mirror,which you can choose by experimenting with those listed athttps://cygwin.com/mirrors.html. For more details about each of page of thesetup installation, read on below.Please note that this guide assumes that you have a basic understandingof Unix (or a Unix-like OS). If you are new to Unix, you will also want to make use ofother resources.
Cygwin uses packages to manage installing various software. Whenthe defaultInstall from Internet
option is chosen,setup creates a local directory to storethe packages before actually installing the contents.Download from Internet
performs only the firstpart (storing the packages locally), whileInstall from Local Directory
performs only the second (installing the contents of the packages).
TheDownload from Internet
option is mainlyfor creating a base Cygwin package tree on one computer for installation on several machines withInstall from Local Directory
; copy theentire local package tree to another machine with the directorytree intact. For example, you might create aC:\cache\
directory and placesetup in it. Runsetup toInstall from Internet
orDownload from Internet
, then copy the wholeC:\cache\
to each machine and instead chooseInstall from Local Directory
.
Though this provides some basic mirroring functionality, if youare managing a large Cygwin installation, to keep up to date we recommend using a mirroring tool such aswget. A helpful user on the Cygwin mailing list created a simple demonstration script to accomplishthis; search the list formkcygwget for ideas.
TheRoot Directory
for Cygwin (defaultC:\cygwin
) will become/
within your Cygwin installation. You must have write access tothe parent directory, and any ACLs on the parent directory willdetermine access to installed files.
TheInstall For
options ofAll Users
orJust Me
should always be left on the defaultAll Users
, unless you do not have write access toHKEY_LOCAL_MACHINE
in the registry or the All Users Start Menu. This is true even if you are the only user planning to use Cygwin on the machine. Note that selectingJust Me
will causeproblems for Cygwin applications running as service, such ascrond orsshd.If you do not have the necessary permissions, but still want to use theseprograms, consult the Cygwin mailing list archives about others' experiences.
TheLocal Package Directory
is the cache wheresetup stores the packages before they areinstalled. The cache must not be the same folder as the Cygwinroot. Within the cache, a separate directory is created for eachCygwin mirror, which allowssetup to usemultiple mirrors and custom packages. After installing Cygwin,the cache is no longer necessary, but you may want to retain thepackages as backups, for installing Cygwin to another system,or in case you need to reinstall a package.
TheDirect Connection
method of downloading willdirectly connect. If your system is configured to use a proxy server orauto-configuration scripts, theUse System Proxy Settings
method uses those settings. Alternatively, you can manually enter proxysettings into theUse HTTP/FTP Proxy
section.
Since there is no way of knowing from where you will be downloadingCygwin, you need to choose at least one mirror site. Cygwin mirrors are geographically distributed around the world; check the list athttps://cygwin.com/mirrors.htmlto find one near you. You can select multiple mirrors by holding downCTRL
and clicking on each one. If you have the URL of an unlisted mirror (for example, if your organization has an internal Cygwin mirror) you can add it.
For each selected mirror site,setup downloads asmall text file calledsetup.bz2
that contains a listof packages available from that site along with some basic information abouteach package whichsetup parses and uses to create thechooser window. For details about the format of this file, see thesetup homepage.
The chooser is the most complex part ofsetup.Packages are grouped into categories, and one package may belong to multiple categories (assigned by the volunteer package maintainer). Each packagecan be found under any of those categories in the hierarchical chooser view.By default,setupwill install only the packages in theBase
categoryand their dependencies, resulting in a minimal Cygwin installation.However, this will not include many commonly used tools such asgcc (which you will find in theDevel
category). Sincesetup automatically selectsdependencies, be careful not to unselect any required packages. In particular, everything in theBase
category isrequired.
You can changesetup's view style, which is helpfulif you know the name of a package you want to install but not which category it is in. Click on theView
button and it will rotate betweenCategory
(the default),Full
(all packages), andPending
(only packages to beinstalled, removed or upgraded).If you are familiar with Unix, you will probably want to at least glance through theFull
listing for your favorite tools.
Once you have an existing Cygwin installation, thesetupchooser is also used to manage your Cygwin installation. Information on installed packages is kept in the/etc/setup/
directory of your Cygwin installation; ifsetup cannot find this directory it will act as ifyou have no Cygwin installation. Ifsetupfinds a newer version of an installed package available, it will automatically mark it to be upgraded. ToUninstall
,Reinstall
, or get theSource
for an existing package, click onKeep
to toggle it. Also, to avoid the need to reboot after upgrading, make sureto close all Cygwin windows and stop all Cygwin processes beforesetup begins to install the upgraded package.
To avoid unintentionally upgrading, use thePending
view to see which packages have been marked for upgrading. If youdon't want to upgrade a package, click on the new version number totoggle it until it saysKeep
. All packages can beset to stay at the installed version by pressing theKeep
button in the top right part of the chooser window.
A previous version of each package is usually available, in case downgradingis required to avoid a serious bug in the current version of the package.Packages also occasionally have testing (or "experimental") versions available.Previous and experimental versions can be chosen by clicking on the package'sNew
column until the required version appears.
All available experimental packages can be selected by pressing theExp
in the top right part of the chooser window.Be warned, however, that the next time you runsetupit will try to replace all old or experimental versions with the currentversion, unless told otherwise.
First,setup will download all selected packagesto the local directory chosen earlier. Before installing,setup performs a checksum on each package. If thelocal directory is a slow medium (such as a network drive) this can takea long time. During the download and installation,setupshows progress bars for the current task and total remaining disk space.
You may choose to install "Cygwin Terminal" shortcuts on the Desktopand/or Start Menu. These shortcuts runmintty,which will start your default shell as specifiedin/etc/passwd
.
Last of all,setup will run any post-installscripts to finish correctly setting up installed packages.When the last post-install script is completed,setupwill display a box announcing the completion. A few packages, such asthe OpenSSH server, require some manual site-specific configuration. Relevant documentation can be found in the/usr/doc/Cygwin/
or/usr/share/doc/Cygwin/
directory.
Unfortunately, the complex setup process means that odd problems canoccur. If you're having trouble downloading packages, it may be networkcongestion, so try a different mirror and/or a different protocol (i.e.,HTTP instead of FTP). If you notice something is not working afterrunning setup, you can check thesetup log fileat/var/log/setup.log.full
. Make a backup of thisfile before runningsetup again, and follow thesteps forReportingProblems with Cygwin.