How long should it take Cygwin to load?

10

4

I recently downloaded Cygwin so I could easily use gcc. It installed correctly, and gcc compiles programs and reports errors as expected... but I can't help but notice that it appears to be taking an extremely long time to load the environment each time I run cygwin.

Whenever I run Cygwin, it takes a good 40-60 seconds for the cygwin command line to finish processing and start accepting input. Is this normal? If not, what might be causing this long wait time? Clearly, I don't intend to do something extremely time sensitive, but this remains an annoyance, and I'm wondering if its fixable.

I'm on a laptop running windows 7 32-bit. Could processor power (or my relative lack thereof) be the underlying issue?

Raven Dreamer

Posted 2010-09-09T18:44:06.933

Reputation: 1 621

I have the same problems, although 2-3 minutes is a looong time. Mine's more like 20 seconds (but I have got a fairly speedy computer). – Skilldrick – 2010-09-09T18:49:42.817

3 minutes is long. < 20 seconds unless you have some crazy shell settings. – Nix – 2010-09-09T18:51:31.617

I uninstalled some parts of the devel package (that contains GCC). Time seems to have been reduced -- now only 40-60 seconds. Original post updated. – Raven Dreamer – 2010-09-09T19:11:07.990

1

You might look into andLinux http://andlinux.org. I've found it to be faster and easier to set up than Cygwin. Much less painful...

– None – 2010-09-15T23:56:20.043

Answers

10

It should only take a few seconds. Have you got bash-completion installed? Starting that can really slow things down, especially if network drives are involved as well. Either uninstall the package or move its startup script out of /etc/postinstall.d. Other scripts in there might slow things down too.

ak2

Posted 2010-09-09T18:44:06.933

Reputation: 3 387

@ak2 - In windows, I can't find /etc/postinstall.d in my fodler C:\cygwin64\etc\postinstall – Steam – 2015-01-01T01:01:37.560

@ak2 - I removed the bash-complete using your instructions for the installer. That took about 15 mins. Now, cygwin takes 20+ seconds to load which is still very slow. I have run it in admin and non admin mode. – Steam – 2015-01-01T01:28:03.327

Yes!!! I've also been wondering about the 40-60 second start up to get a bash shell running. Uninstalling bash-completion reduces it to about 5 seconds. Thanks! – Harold Bamford – 2010-09-09T21:29:43.487

I searched my system, and I do in fact have a file called "bash-completion". I'll accept this as an answer if you can give me a more detailed explanation on how to disable bash-completion. – Raven Dreamer – 2010-09-11T18:28:22.650

That's rather cheeky. At least be more specific than just asking for more details. And there might be quicker ways than Stackoverflow to find out how to uninstall a Cygwin package ... – ak2 – 2010-09-12T05:48:40.657

1More details? I've never used Cygwin before. All I've done is use the default installer. I've never dealt with shells before, and I have no idea what bash-completion is or even does. So: Could you provide step-by-step instructions for uninstalling the bash-completion package? "uninstall the package" is not enough for me to go by. – Raven Dreamer – 2010-09-14T18:25:34.723

3

Bash-completion adds more fancy tab completion features than available by default. To uninstall, run setup.exe again. Click your way through to the package selection screen. Click on the 'View' button on the top right to switch to the 'Full' view. Type 'bash-completion' into the search box. Click on the Cycle icon next to the package's version until it says 'Uninstall'. Click Next. Follow further instructions. http://cygwin.com/faq/faq-nochunks.html#faq.setup.uninstall-packages

– ak2 – 2010-09-14T20:51:52.537

1Found that this got added when I installed git and git-completion. Reduced my bash startup to a second or two from 15+ seconds. Great answer, thanks. – Danny Thomas – 2012-01-06T13:29:39.690

3

Depending on your system resources, cygwin should be relatively quick. I've found it to be very buggy in a lot of ways though. I've recently switched to using AndLinux to get unix/linux functionality on my windows boot and it works far far better in my opinion.

MaQleod

Posted 2010-09-09T18:44:06.933

Reputation: 12 560

andLinux is a complete Ubuntu Linux system running seamlessly in Windows 2000 based systems (2000, XP, 2003, Vista, 7; 32-bit versions only. ---> It is available for 32 bit only. Is there plenty of beginner level support and documentation ? – Steam – 2015-01-01T01:03:33.573

1

If you are on a computer with Active Directory, insert the following lines into /etc/nsswitch.conf as described here: https://www.cygwin.com/faq.html#faq.using.startup-slow

passwd:   files
group:    files

waitinforatrain

Posted 2010-09-09T18:44:06.933

Reputation: 175