Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
Microsoft Unix Windows Technology

Cygwin 1.7 Released 203

jensend writes "The 1.7 branch of Cygwin, the Unix-like environment for Windows, has reached stable status after about 3 1/2 years of effort. Among many other changes, this release drops support for Windows 9x. Since the NT API and NT-based versions of Windows are more capable and somewhat less of a mismatch with POSIX (for instance, they include a security model), this has allowed for code path simplifications, better performance (particularly noticeable with pipe I/O), better security, and better POSIX compatibility."
This discussion has been archived. No new comments can be posted.

Cygwin 1.7 Released

Comments Filter:
  • by gzipped_tar ( 1151931 ) on Friday December 25, 2009 @01:04AM (#30549252) Journal
    ... Does it run under WINE?
    • by DMUTPeregrine ( 612791 ) on Friday December 25, 2009 @02:29AM (#30549552) Journal
      Yes, Cygwin does run under WINE. And WINE runs under Cygwin. It can be an amusing stress test.
      • Cygwin does run in Wine [winehq.org], but Wine doesn't actually run under Cygwin as yet, or even compile [winehq.org]. Helpers wanted!

        • by fm6 ( 162816 )

          OK, I'll bite: what's the utility of providing a compatibility layer for APIs that are already available in the native form?

          • Very little. The main reason for Cygwin on Wine is to test the quality of both. The main reason for Wine on Cygwin is to make Wine more cross-platform (as opposed to Linux, Linux and Linux), and BECAUSE WE CAN DO THIS WRONG AND BAD THING!

            There's the excuse that we could use it to support stuff on newer versions of Windows that they don't support natively, or to support XP apps better than Win7 does or whatever. But really, it's because it's BAD AND WRONG and therefore fun. What's not to like?

            That said, I ha

  • by SanityInAnarchy ( 655584 ) <ninja@slaphack.com> on Friday December 25, 2009 @01:07AM (#30549270) Journal

    Windows has had a POSIX layer of its own for awhile now, as "Services for Unix".

    On the lighter-weight end, mingw can give you the basics, and they usually run much faster (even bash!) than Cygwin did. Maybe Cygwin is better now, it's just that I don't really see what it has over, well, any other way of running POSIX apps on Windows.

    • Re: (Score:3, Informative)

      by LoRdTAW ( 99712 )

      A bash shell and a great collection of Unix command line tools. Its how I backup my Vista box to my Linux server via ssh.

      • Mingw has both of these, and is much faster, last I checked.

        • Mingw may be faster than Cygwin (not hard), but I'd be surprised if it's faster than Interix (SFU/SUA). Interix binaries are "native" in the same sense that Win32 binaries are (technically speaking the NT kernel doesn't support either Win32 or POSIX syscalls directly; that's what its subsystems are for).

          Furthermore, Interix is simultaneously better integrated with the OS and uses more *NIX-type behavior (case-sensitive UNIX-path filesystem, allows any extension or none at all on executables, etc.) Frankly,

          • Re: (Score:2, Informative)

            by nimble ( 1707376 )
            Things that Cygwin does better than SFU (as in what's on offer from MS. Dunno about community projects on top of that.)

            - The latest version is available for all Windows (>=NT) variants, not just Enterprise and Ultimate.
            - It's more compatible with GNU/Linux extensions (since SFU is not aimed at that).
            - It's open source with open development, short release cycle, and responsive mailing list.
            - Package system. (It's no apt-get, but it does its job, including dependency resolution and updates.)
            - Big

      • by Genocaust ( 1031046 ) on Friday December 25, 2009 @01:41AM (#30549400)
        Why not something less convoluted like andLinux [andlinux.org]? I used Cygwin when I first started tinkering with Linux when I was young, but there are so many better alternatives at this point I don't understand why it's still around.
        • by bcat24 ( 914105 ) on Friday December 25, 2009 @02:11AM (#30549504) Homepage Journal

          andLinux only supports 32-bit versions of Windows, for one thing. I'd like to give it a spin on my 64-bit Windows 7 desktop, but I can't. Cygwin may not be ideal, but it has the advantage of actually being usable by me. :)

        • thats a naive statement. Cygwin can be extremely useful for installing and using Linux programs if for some reason you are stuck on Windows XP, without needing to dual boot or install Linux seperaretely. Yes you have to recompile the programs for cygwin and the cygwins support for APIs could be better but it can be a really useful idea. The other alternative is to run Linux under a VM which could use a lot more of you system resources compared to cygwin, plus having to boot an entirely another OS. Furthermo

          • I'm not sure I understand the point you're trying to make? While this post [slashdot.org] makes a good point about andLinux not supporting x64 yet, I'm not sure what your argument against it in favor of Cygwin is. It's not a VM or a dual boot. It runs in tandem with Windows, just like Cygwin, only more seamlessly (imo).
      • Re: (Score:3, Informative)

        by cheesybagel ( 670288 )
        Last time I tried installing SFU it failed so badly I could not even do an 'ls'.

        Besides, if it does not have X11 and all the trimmings of a Linux distro it is not that much use. You need both a working SFU and something like darwinports or fink. Which does not exist AFAIK.

        Oh, also, the Cygwin GCC can compile native Win32 programs if you choose it so, which will run on machines without Cygwin installed. That makes it useful all in itself. Before Visual C++ Express was available GCC was the only decent fr

    • by Dwedit ( 232252 )

      I once tried out Services For Unix. I then attempted to build GNU Tar, but couldn't figure out how to make the integrated Unzip part of it work, so I gave up. That's too bad, since Cygwin royally sucks at fork.

    • by Darkness404 ( 1287218 ) on Friday December 25, 2009 @01:39AM (#30549384)
      Yeah, but Services For Unix seem to be coming to an end. The download says it won't work on Vista or 7, and the Wikipedia page says it will stop being downloadable at the end of 2009.
      • Re: (Score:3, Informative)

        by yuhong ( 1378501 )
        Which is correct. Windows Server 2003 R2, Vista Enterprise and higher editions have the successor Subsystem for UNIX-based Applications (SUA) available as optional install that replaces SFU.
      • Its called something else now, in typical MS style. Can't remember the new name off the top of my head.

        They also dropped the NIS or NFS server, perhaps both. Added an ssh server maybe? I can't remember exactly, I haven't dealt with it recently.

      • You missed the part of the Wikipedia page that pointed out the Subsystem for UNIX Applications (SUA) which is the same feature on Vista, Win7, Server 2003 - 2008 R2, and presumeably future releases. There's no sign of it going away soon.

        I use SUA (which, aside from install mechanic, is functionally identical to SFU plus some new features) all the time on Win7. My main CLI shell is bash (pinned to my taskbar), I use ssh more often than remote desktop, I use subversion in Interix rather than something like TortoiseSVN, and I once completed a substantial programming project (involving a multi-threaded, multi-process, networked program for embedded Linux) by developing (and testing) on Interix before (testing and) deploying on Linux. It was substantially easier than rebooting, virtualizing, or working remotely on my school's Linux servers.

    • Re: (Score:3, Insightful)

      by R.Mo_Robert ( 737913 )

      The biggest--perhaps only--reason I install Cygwin on Windows is because so many cross-platform applications require it for compilation (Mozilla, I'm looking at you). Of course, whether they coud ue MinGW and/or the Windows "Services for Unix" layer to accomplish something similar is another story, but until they decide to change and support it, Cygwin it is.

      And personally, having had to install Cygwin, I've never even paid attention to the POSIX layer for Windows, but it looks like it might be worth lookin

      • by kill-1 ( 36256 )

        Mozilla's build environment for Windows is based on MinGW for quite some time now.

        • Shows how long it's been since I've built Mozilla on Windows...glad to see the new system looks a bit better.

    • Re: (Score:3, Informative)

      SFU (now called SUA, "Subsystem for Unix Applications") is rather good, but the problem with it is that it is only present in Enterprise and Ultimate editions of Vista/7, or in 2008. Since most people use Home or Professional, they can't get it. This is a problem when porting applications, since now your port requires Enterprise/Ultimate.

      With Cygwin, a ported application not only runs on any version of Windows, but you don't require the user to install the runtime before running it - you just package Cygwin

      • They are complimentary.

        Just don't try running them side-by-side without a lot of tweaking. Both use a handful of system environment variables, with a number of collisions (PATH being an obvious one). Cygwin binaries are just wimple Win32 programs (exe/dll extension and all) while SUA binaries are not (they are true POSIX applications, although they use the PE binary format), but since SUA shells will also execute Win32 applications, typing something as simple as "ls" can be ambiguous - is it SUA's /bin/ls or Cygwin's /bin/ls.exe?

        I had the bloody hardest time getting SUA working on a friend's machine once, until I realized he used Cygwin already. At that point I told him to just stick with one or the other per system - there's not enough advantage, and too much hassle, to having them installed on the same box.

    • Re: (Score:3, Interesting)

      by SharpFang ( 651121 )

      A couple thousands of binaries of Linux apps installable with a couple of clicks, integrating with the system and each other?

      How long, since you decide you want to, until you can start writing, compiling and running GCC, perl, python and such apps, on "Services for Unix"? On Cygwin it's about 20 minutes from which 15 you spend drinking coffee watching the progress bars.

  • by pydev ( 1683904 ) on Friday December 25, 2009 @01:10AM (#30549280)

    Even after all these years, Microsoft has nothing equivalent to the UNIX command line. The standard cmd.exe is too limited, and Powershell isn't a good interactive shell, it's more like typing at a Python or Ruby interpreter. Cygwin makes doing anything on Windows marginally tolerable and I install it on any Windows machine I happen to use.

    • I just can't see any reason myself or an average Windows user would need a UNIX command line on their Windows computer. In fact, I think the whole point of Windows is to get away from the command line.
      • Because the Windows command line blows. There are still plenty of situations where a command line is preferable on Windows, and I'd keep Cygwin on it just to have non-brain-dead command history functionality, if for no other reason.
        • err no, the commandline blows BECAUSE they want you to use the gui, not the other way around. does your dogs tail wag your dog ?
          • It's fine if they want you to use the GUI, make a superior way to do things in the GUI and people will use it. Making the command line interface so lousy that people will actually prefer a half-assed GUI is not the right way to go about doing things.

          • I don't really care what Microsoft wants - there are still many, many situations where a command line is much quicker and more efficient than the UI (deleting a thousand files with the same extension, for instance), and Microsoft has failed miserably at providing an adequate shell.
            • by Sigma 7 ( 266129 )

              (deleting a thousand files with the same extension, for instance), and Microsoft has failed miserably at providing an adequate shell.

              I find del *.jpg to be sufficient. In some more advanced usage of the cmd shell, Mozilla has a set of .bat files that detect the locations of MSVC in order to setup the build environment, and it works in most cases. After digging the appropriate registry key, you can then run the make file to get things started.

              It's an artifact from MS-DOS, and around that time, there were custom utilities meant to augment batch files, such as Batchman. They never appeared as "standard" because of the 640K barrier.

              Of cou

          • I don't think it's that simple. The DOS command line hasn't changed all that much and it's original implementation was based on having a system with 16K or RAM and no hard drive.

            Once Windows came along, there wasn't a lot of reason to improve DOS, but that's not the same thing as trying to force you to use the GUI.

      • Re: (Score:3, Insightful)

        by RAMMS+EIN ( 578166 )

        I just can't see any reason myself or an average Windows user would need a UNIX command line on their Windows computer. In fact, I think the whole point of Windows is to get away from the command line.

        I don't see it that way. I don't see a point in getting away from the command line. Some things are most easily or quickly done or explained with the command line, just as other things are most easily or quickly done or explained using windows, icons, menus and a pointer. It's good to have good support for both in your system.

        The way I see it, the point of Windows, from a customer's perspective, is to run Windows applications. That is the one thing Windows does better than any other operating system out the

      • Re: (Score:3, Insightful)

        by lena_10326 ( 1100441 )

        I just can't see any reason myself or an average Windows user would need a UNIX command line

        If you are a developer or sysadmin who deals with data, then you use the command line. You can take several hundred log files, run them through 1 liner piped commands (find, grep, xargs, awk, sed, perl, sort, uniq, wc, head, tail, etc), output a CSV file, and pop it into Excel in about 10-20 minutes. Try doing that with only Excel and you'll be there all day.

      • by selven ( 1556643 )

        What's with all this hatred of the command line? The command line is an interface, just like the graphical one, and it is a very powerful interface that can do things GUIs will never do (how do you even try to make a full (not just if x in the line sub y with z) GUI for sed without making it a textbox?)

      • Show me how to do

        $mkdir Project\ {1..10}

        In a GUI. As one excruciatingly simple example of how a CLI can be much more useful and expressive than a GUI.
    • by heffrey ( 229704 )

      The gnu toolset can compiled natively on Windows so why would you want to use cygwin as a shell?

    • Re: (Score:3, Insightful)

      by bvankuik ( 203077 )

      If you think about it, it is almost unbelievable that Microsoft would release a new shell, then mak it not POSIX compliant. Almos defy OS for the last couple of decades has aimed for POSIX compliancy. Then when they build a shell, they ignore that and go on their own way. I wonder what would have happened if they just tried to conform.

      A lot of sysadmins who are fluent with shell scripting, could have jumped in and have a huge advantage administering Windows machines. A lot of free utilities could easily be

    • While it requires the higher editions of Windows (XP Pro, Vista/7 Enterprise or Ultimate, any Server edition), you must have missed the presence of the POSIX subsystem in NT (it's been there since the first releases of the OS, incidentally). Called the Subsystem for UNIX Applications (SUA) on recent versions, or Services For UNIX (SFU) on XP and before, the POSIX subsystem is free on supported Windows and includes a decent operating environment called Interix.

      Interix includes a few hundred libraries and utilities, mostly BSD derived or SVR5-derived (you can choose which lineage you want at install) but also including things like the GNU build toolchain (gcc 3 and 4, with support for at least C, C++, and Fortran; I haven't tried any others). Additionally, you can install a package manager and an expanded/updated collection of tools and software from http://suacommunity.com/sua.aspx [suacommunity.com]. Manpages are also included (both for bundled software and Interix packages).

      Bash (along with other shells such as zsh) is available from suacommunity. Interix ships with csh and ksh. I use Interix bash as my standard Windows command line these days, including running Windows CLI utilities. I also run Python and Ruby interpreters from within Interix (suacommunity packages). You can even run graphical applications if you have an X server such as xming (the suacommunity bootstrapper will offer to install it).

      If you have a version of Windows that supports the POSIX subsystem (businesses mostly will), I recommend it over Cygwin. For one thing, you get true *NIX behavior - executables are marked by permissions bits, not by extensions, the filesystem is case-sensitive (technically an install option for Interix, but one you definitely want), and you get UNIX-style permissions including working setUID and setGID (having a working sudo makes using the command line on a non-Administrator Windows session much more pleasant).

    • "The standard cmd.exe is too limited, and Powershell isn't a good interactive shell, it's more like typing at a Python or Ruby interpreter"

      Well, it sounds like you simply like the UNIX command line and define it as command-line "goodness". No problem with that, but some people consider the UNIX command line to not be powerful enough and prefer Powershell.

      • I'm not sure how you could define something like Bash as "not powerful enough". I haven't seen any kind of automation that couldn't be done in it. I'll admit off the top that I haven't really done much in Powershell, but rather than have to learn Yet Another Microsoft Scripting Language, why the fuck don't they just implement their own native port of Bash? It's like they have this extreme allergy to Unix.

    • by fm6 ( 162816 )

      I'm not a Mac guy, but I seem to recall that Apple never provided a command line either. The one they have now came for free when they switched to using NextStep OS, which got it for free from the Mach OS, which got it for free from BSD.

  • by Dwedit ( 232252 ) on Friday December 25, 2009 @01:23AM (#30549330) Homepage

    For a while, I've been using a modified version of Cygwin [okisoft.co.jp] in order to get proper UTF-8 support. Does the new version finally integrate a similar feature?

  • search! (Score:5, Informative)

    by spongman ( 182339 ) on Friday December 25, 2009 @01:31AM (#30549358)

    love the search feature in setup.exe !! long overdue, but welcome nonetheless.

  • Let's be honest -- whether Linux or BSD is ready for the desktop, ready for the laptop is something slightly lacking, and I mostly have laptops these days. I couldn't take it anymore with Linux or BSD on my laptop, so I bought Vista. Of course, I can't live without a command line, because that's what I'm used to. I remembered having used Cygwin years ago, back in the Win95 days, and so I tried to give it ago.

    No dice -- it doesn't really integrate with the rest of the system very well, I find. Maybe I'm
    • by jhol13 ( 1087781 )

      I use it entirely for interactive use. It is not very good for testing "does it compile in Unix" as it is not that compatible with modern distros.

      The default setting does require a bit tinkering and it does have some issues[1], but other than that it is pretty good command line.

      [1] Usually with Windows commands - they insist not to work with paths (take them as command switches), symbolic links, etc.

    • I don't think Cygwin is "meant to be an interactive method of accessing a Windows machine by Unix commands" so much as it is a Unix/POSIX/GNU compatibility layer for Windows, similar to how WINE is a Windows compatibility layer for *nix. Both of them allow you, to a limited extent, to run software written for the other set of APIs.

    • by plasticsquirrel ( 637166 ) on Friday December 25, 2009 @04:31AM (#30549844)
      Cygwin isn't meant to give you all the Linux or Windows system features, just provide a full-featured POSIX emulation layer (at its core, just one DLL), and programs compiled for that. You may still need to use Windows utilities to access Windows-specific features that have no POSIX implementation. However, the important thing is that it basically gives Unix developers a common platform, so anything developed for general Unix systems will compile on Cygwin's POSIX emulation layer.

      Since Cygwin basically throws you into a command shell, it really does require an understanding of the fundamentals of Unix/Linux systems and how to work effectively in a shell. For example, I doubt many users of Slackware or NetBSD would have any substantial complaints about Cygwin. As someone who used Cygwin for years in a corporate environment where I could not use Linux, it was a godsend. I could spend my whole day working in Cygwin without having to mess with Windows development environments. Being able to throw together a bash script that uses grep, sed, awk, etc. is so nice for a stranded Linux user. However, many people do not learn the basic utilities anymore, even basic things such as customizing a login shell.

      If there is a weak point in the Cygwin interactive experience, in my opinion it comes from the fact that the default Windows terminal program is used, which is slow and generally terrible compared to the modern Linux terminal apps. Maybe someday there will be a fast and full-featured replacement. But as it is, the Windows terminal is basically sluggish early 90's cruft that just isn't up to the task. Not a fault of Cygwin, but still a problem when running any such programs on Windows.
      • Re: (Score:2, Informative)

        by nimble ( 1707376 )
        Good post. Regarding the last point about the default console, Cygwin ships with a number of replacement terminals: (u)rxvt, xterm, mintty. Mintty in particular provides a native Windows interface with Unicode support and does not require an X server. More at http://mintty.googlecode.com/ [googlecode.com]
      • by bsDaemon ( 87307 )
        I'm quite proficient with tcsh and bash and many command-line utlitiies. On a real *nix system, I'm extremely happy. I think I just found there to be a lack of integration that was getting in my way and it was probably due to my perception of what it was supposed to be vs what it actually was.
    • so that I could have a Unix-ish environment without having to worry about power management or weird wifi issues that I'd had with Fedora, CentOS, Ubuntu, Slackware, ZenWalk, Mint, FreeBSD, OpenBSD and PC-BSD...

      No, I'm sorry. The correct answer is "BeOS."

  • by Anonymous Coward

    It used to be if I wanted to run some Linux code under Windows I'd have to have a Linux box nearby, boot into Linux, or deal with Cygwin. I've never really enjoyed using Cygwin it's a pain to use, maintain, work with, and code for. There are lots of subtle differences in how your code behaves when you go from Linux to Cygwin (for example, re-writing someone's entire program because they liked to use lots of mallocs and Cygwin mallocs are unbelievably slow).

    At this point though you can either run VMware, get

    • The point of Cygwin is to relatively easily port Unix (including Linux) applications to Windows, without doing major rewrites. The result isn't optimal, performance-wise, but it often gets the job done, and the end user doesn't even need to know that it's running on top of Cygwin (he only sees the DLL, but that's it).

      If you want a shell that builds on (and further extends) Unix principles, and is well-integrated into Windows, you should really use PowerShell.

    • Running vim under xterm is awesome. And without using 1 thousand fifteen zillion megabyte of memory to run andLinux...

      I have tried almost everything and always come back to cygwin. Virtualbox takes care of the remote cases.

      Personally, I am not too excited about v1.7, since I had pretty bad experiences with the beta as late as 2-3 months ago.

    • The compatability issues with Cygwin never really doing things very well with supporting POSIX is a big problem, it seems like Cygwin that somewhat defective is good enough. if they could just go a little bit further they could make most stuff work out of the box, they have gone almost 100% there why they stop at 95% i dont know.

      It also is a serious problem that Cygwin does not support case sensitive file names which can screw up some Unix stuff. There are ways they could do this by doing a simple filesyste

  • Now they'll let me put it on our production 2008 boxes. No more RDP to do every little thing!

  • The Windows command interpreter sucks as a terminal program. What's a good alternative for use with Cygwin? I'd prefer Unicode support, so I don't see question marks on all non-ascii filenames.

  • I am surprised that there are so many Cygwin haters out here. I install it on every Windows machine I own. Life would be very difficult without it. I did find the Windows command console that Cygwin uses, very limiting. Cut-n-paste is extremely painful. However I discovered puttycyg http://code.google.com/p/puttycyg/ [google.com] that provides the putty interface for Cygwin. And now I don't have much to complain about.

    For those talking about Services For Unix, does SFU provide all the tools (latest version of Sub

To write good code is a worthy challenge, and a source of civilized delight. -- stolen and paraphrased from William Safire