10

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?

  • 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 Sep 09 '10 at 18:49
  • 3 minutes is long. < 20 seconds unless you have some crazy shell settings. – Nix Sep 09 '10 at 18:51
  • 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 Sep 09 '10 at 19:11
  • 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... –  Sep 15 '10 at 23:56

3 Answers3

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
  • 3,735
  • 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 Sep 09 '10 at 21:29
  • 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 Sep 11 '10 at 18:28
  • 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 Sep 12 '10 at 05:48
  • 1
    More 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 Sep 14 '10 at 18:25
  • 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 Sep 14 '10 at 20:51
  • 1
    Found 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 Jan 06 '12 at 13:29
  • @ak2 - In windows, I can't find /etc/postinstall.d in my fodler C:\cygwin64\etc\postinstall – Steam Jan 01 '15 at 01:01
  • @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 Jan 01 '15 at 01:28
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
  • 13,215
  • 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 Jan 01 '15 at 01:03
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