How do I install a Package Manager within Cygwin ?

Though Cygwin provides the ability to update and install packages via the use of the Cygwin`s setup.exe command, the command line installer apt-cyg provides apt-get like syntax whilst still using Cygwin’s native package repository.


Below details the steps required to install the apt-cyg command line installer.



First of all you will need to ensure that Cygwin has the necessary binaries required for apt-cyg. This is achieved via the use of the Cygwin setup executable via the Windows command prompt.

C:\Windows\System32>C:\Users\admin\Downloads\setup.exe -q -P  wget,tar,qawk,bzip2,subversion,vim


Next download and install apt-cyg from within Cygwin.
$ svn --force export  /bin/ 
$ chmod +x /bin/apt-cyg


apt-cyg install <package names>” to install packages
apt-cyg remove <package names>” to remove packages
apt-cyg update” to update setup.ini
apt-cyg show” to show installed packages
apt-cyg find <pattern(s)>” to find packages matching patterns
apt-cyg describe <pattern(s)>” to describe packages matching patterns
apt-cyg packageof <commands or files>” to locate parent packages


$ apt-cyg install rsync
 Working directory is /setup
 Mirror is
 --2011-05-09 06:44:24--
 => `.listing'
 Resolving ( 2620:0:dc0:1800:214:4fff:fe7d:1b9,,
 Connecting to (|2620:0:dc0:1800:214:4fff:fe7d:1b9|:21... failed: Connection timed out.
 Connecting to (||:21... connected.

!! Output Omitted !!

2011-05-09 06:45:16 (131 KB/s) – `rsync-3.0.8-1.tar.bz2′ saved [272248]

Package rsync requires the following packages, installing:
libgcc1 libiconv2 libpopt0 cygwin
Package libgcc1 is already installed, skipping
Package libiconv2 is already installed, skipping
Package libpopt0 is already installed, skipping
Package cygwin is already installed, skipping
Package rsync installed


Rick Donato

Want to become a Linux expert?

Here is our hand-picked selection of the best courses you can find online:
Linux Mastery course
Linux Administration Bootcamp
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial