79

I need an offline installer with most of the utilities commonly needed. Somehow the default installer confuses me with all its package selection. I installed Cygwin but I can't find the diff utility after the installation.

Srikanth
  • 11,780
  • 23
  • 72
  • 92
  • Doesn't this belong on ServerFault or SuperUser? (ducks, please don't flame) – einpoklum Nov 27 '13 at 15:20
  • 10
    @einpoklum I asked this question 4 years ago. If my memory serves right, I think there was no ServerFault or SuperUser at that time. – Srikanth Nov 28 '13 at 09:13

11 Answers11

146

Here are instructions assuming you want to install Cygwin on a computer with no Internet connection. I assume that you have access to another computer with an Internet connection. Start on the connected computer:

  • Get the Cygwin install program ("setup.exe"). Direct download URL: x86 or x86_64.

  • When the setup asks "Choose a download source", choose Download Without Installing

  • Go through the rest of the setup (choose download directory, mirrors, software packages you want, etc)

  • Now you have a Cygwin repository right there on your hard disk. Copy this directory, along with the "setup.exe" program, over to your target computer (it does not need to be on a network).

  • On the target computer, run "setup.exe"

  • When the setup asks "Choose a download source", choose Install From Local Directory

  • Complete setup as usual. No Internet access is required.

Paul
  • 6,435
  • 4
  • 34
  • 45
  • 8
    Christ, cheers for this. Bloody obvious when you think about it but I also remember googling frantically for some sort of offline installer before. – Gavin Gilmour Jan 10 '10 at 13:59
  • 2
    This works, but since I had an existing installation on the same system I had to painstakingly click "retrieve" for each package I had already downloaded in the local installation in order to create the install package I was moving to the remote system. Is there a better way to do this? – Bogatyr Jun 04 '13 at 15:41
  • 3
    On the target computer, you can run `setup-x86.exe -q -R %SystemDrive%\cygwin -P openssh,openssl,curl,cygrunsrv,wget,rebase,vim,nano -L .` for an unattended install of sshd. – Kevin Smyth Aug 16 '13 at 19:57
  • Any idea the full size of all packages? – Kostanos Sep 08 '13 at 16:18
  • For others looking for the retrieve option: It only appears when you select the "Download without installing" option. – RedX Dec 10 '13 at 11:29
  • This is not an offline installer. It is just the online installer minus the install part. And it is equally slow slow. As a large number of very small packages are downloaded sequentially and there is some low bandwidth activity between downloading of two packages. Result is that it does not fully utilize the available bandwidth like a solid 4GB file would when downloaded using a download manager capable of segmenting. I have a high speed connection and it downloads at annoyingly slow average speed of 50 KBps. – Dojo May 15 '15 at 06:38
  • 1
    Is there any way to make the offline install automatically select all the previously downloaded packages? – Jason C Jan 25 '16 at 04:26
  • I'd like to know if there's a way to make this replicate your existing installation from computer A to (offline) computer B. I.e. so you don't have to click Retrieve on all your currently installed non-default packages. Also, when you select a non-default package, is this offline method supposed to be smart enough to also grab the dependancies? It did not for me. I added the package `chere`, and it downloaded fine, but when I tried to install on the offline computer, it complained dependancy `bash` was missing. Which is weird because I thought Bash was a core package. – SSilk Sep 21 '21 at 18:03
24
  1. Pick a mirror server closest to you from http://cygwin.com/mirrors.html

Choose any FTP or HTTP mirror.

  1. Download the whole mirror maintaining exact file tree structure of the cygwin directory in the mirror.

    Edit: How to download the whole mirror?

    wget -m <ftp-mirror-url>
    
  2. Execute setup.exe & choose source as local directory and browse to the release directory.

Now you have the Offline Cygwin Installer.

Update: Use Babun. It's based on cygwin and more user friendly. Get Babun

Update 2: Use cmder with git for windows.

abhisekp
  • 4,648
  • 2
  • 30
  • 37
  • 1
    This was the correct answer, I don't know why wasn't choose as it. Anyway, +1 – Cutberto Ocampo Oct 09 '14 at 01:16
  • 2
    for the info about Babun...+1 – Paul Varghese Feb 18 '16 at 13:41
  • FYI Babun has been "Discontinued" for a few years now. – 8forty Sep 13 '21 at 15:07
  • FYI, if you're having trouble connecting to Cygwin mirrors' FTP sites (maybe because of a corporate firewall policy), and you want to use the HTTPS mirrors, the above may download way more than you wanted. I tried it on the Waterloo HTTPS which, being a plain directory includes a `..` link to the parent directory. So it downloaded everything under the Cygwin directory, then followed the parent link and started downloading everything from the main site. Instead, it may be better to use `wget --recursive --no-parent `. – SSilk Sep 22 '21 at 18:33
22

If all you want is the UNIX command line tools I'd suggest not installing Cygwin. Cygwin wants to turn your Windows PC into a UNIX Workstation which is why it likes to install all its packages.

Have a look at GnuWin32 instead. It's Windows ports of the command line tools and nothing else. Here is the installer for the GnuWin32 diff.exe. There are offline installers for all the common tools.

(You asked for offline installers but in case you ever want one later there is a tool which will download and install everything for you.)

Method 2: make an offline install zip file for cygwin.

Don't mess with saving packages because the installed directory for cygwin can be canned in a zip file and expanded whenever you need it on any computer.

  1. Download Cygwin installer

  2. pick packages you want installed from gui.

  3. hit install and wait a really long time for everything to download.

  4. zip up the C:\Cygwin folder. Now you have your offline zip file for installing cygwin on any machine.

  5. Unzip this file on whatever computer you like. set cmd.exe paths appropriately to point to cygwin bin directory under windows control panel.

Community
  • 1
  • 1
David Webb
  • 190,537
  • 57
  • 313
  • 299
  • Interesting. This is the first I've heard of those folks. Any idea how they do their ports? Are they maintaining them themselves, or are they just providing different packaging for Cygwin or MYSYS ports? – T.E.D. Mar 19 '09 at 14:19
  • Ahh. From http://gnuwin32.sourceforge.net/compile.html it becomes clear that they are just repackaging MSYS. One wonders what they are adding to the process, other than perhaps an easier download interface than Sourceforge. – T.E.D. Mar 19 '09 at 14:26
  • They are not repackaging MSYS. GnuWin32 provides native ports which only rely on standard Windows libraries. The MSYS tools are require the MinGW Unix-emulation layer. The benefit of the GnuWin32 approach is that if you want diff then you can just download the diff package and nothing else. – David Webb Mar 19 '09 at 16:04
  • 2
    MinGW does not have a Unix emulation layer. It's just a native port of the gcc toolchain. From the MinGW website: "MinGW provides a complete Open Source programming tool set which is suitable for the development of native MS-Windows applications, and which do not depend on any 3rd-party C-Runtime DLLs." – Neil Williams Jul 02 '09 at 20:27
  • 49
    He asked for an offline installer of cygwin, not an alternative! – A.L. Mar 06 '13 at 13:35
  • 3
    I don't think it exactly answers the question as it specifically asks about Cygwin so I would definitely prefer the 2nd answer – jmbouffard Apr 05 '13 at 18:18
  • 4
    This is the off topic answer. There are more valid answers below. – Kostanos Sep 08 '13 at 16:17
  • I think the correct answer was the one by http://stackoverflow.com/users/37865/colin – Neoryder Jan 15 '14 at 07:00
5

Not a direct answer to your question, but you can get the most commonly used utilities from http://www.mingw.org/ without having to jump through the hoops with that horrible Cygwin installer.

Here is a slightly more informative link http://sourceforge.net/apps/mediawiki/cobcurses/index.php?title=Install-MSYS.

  • 2
    I have always preferred MinGW myself, all the functionality of Cygwin without the bloat. ;) – Ian Kemp Mar 19 '09 at 12:31
  • 2
    Also, no GPL-infecting DLL for compiled code. MinGW is definitely the source for those in the know. :-) – T.E.D. Mar 19 '09 at 14:29
4

There is another solution to creating an offline Cygwin installer, which is using 'pmcyg' (http://www.sourceforge.net/projects/pmcyg). If you give pmcyg a list of Cygwin packages you'd like to have available, it will automatically download all of them, their dependencies, and the setup.exe into a folder that you can then burn onto a cdrom.

4

Perhaps this description helps you in your task.

http://www.cygwin.com/ml/cygwin/2003-09/msg00041.html

Tobias Langner
  • 10,634
  • 6
  • 46
  • 76
2

Install Babun instead -> https://babun.github.io/index.html It contains Cygwin ;)

zzart
  • 11,207
  • 5
  • 52
  • 47
0

You can download from below link. ftp://ftp.comtrol.com/dev_mstr/sdk/other/1800136.tar.gz After downloading just extract the image and install.

Simon K Bhatta4ya
  • 1,027
  • 2
  • 14
  • 25
0

may this post can solve your problem

see Full Installation Answer on that: What is the current full install size of Cygwin?

Community
  • 1
  • 1
IlPADlI
  • 1,943
  • 18
  • 22
0

I maintained rsync copy of the repository in the past.

It wasn't that big. To reduce the sync size I used rsync option --exclude (like I don't need texlive or ruby and they are not essential for base system).

Check:

Than you host this mirror via HTTP/FTP for local or organization installs:

setup.exe -p emacs --site http://localhost/cygwin
gavenkoa
  • 45,285
  • 19
  • 251
  • 303
-1

I'm not a big fan of Cygwin. It is good if you have some Unix code that requires a full POSIX system, I suppose. Even then, using it renders your programs GPL (due to the GPLed DLL), unless you pay Red Hat for a different license.

Most people should be using MinGW (and MSYS) instead. This gives you the Unix shell and utilities (even compilers, if you want them) without the purposely infectious DLL. Most of the folks using GNU compilers on Windows are using MinGW (although some don't realise it).

Just as importantly for your purposes, you can download the parts separately, rather than use the re-downloading installer.

The SourceForge download page is here. I'd suggest starting with the MSYS Base System package, which will give you the coreutils, Bash, make, tar, etc. If there's other stuff you need, you can pick and choose from the list of packages.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
T.E.D.
  • 44,016
  • 10
  • 73
  • 134
  • 7
    "using it renders your programs GPL" Not necessarily: you can use the g++ flag --no-cygwin, then you are linked to the MinGW DLL's. So, you can have the best of both worlds. – Paul Jun 12 '09 at 06:17
  • 1
    Currently, mingw32 has similar unixization features as cygwin, while it has mutually incompatible 64-bit versions... no comment... considering these, imho it is better to use cygwin. – peterh Oct 20 '16 at 05:42