Slashdot Mirror


Cygwin 1.7 Released

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."

41 of 203 comments (clear)

  1. One question remains... by gzipped_tar · · Score: 5, Funny

    ... Does it run under WINE?

    --
    Colorless green Cthulhu waits dreaming furiously.
    1. Re:One question remains... by DMUTPeregrine · · Score: 5, Informative

      Yes, Cygwin does run under WINE. And WINE runs under Cygwin. It can be an amusing stress test.

      --
      Not a sentence!
  2. Does this do something SFU doesn't? by SanityInAnarchy · · Score: 3, Interesting

    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.

    --
    Don't thank God, thank a doctor!
    1. Re:Does this do something SFU doesn't? by LoRdTAW · · Score: 2, Informative

      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.

    2. Re:Does this do something SFU doesn't? by Darkness404 · · Score: 4, Informative

      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.

      --
      Taxation is legalized theft, no more, no less.
    3. Re:Does this do something SFU doesn't? by Genocaust · · Score: 3, Informative

      Why not something less convoluted like andLinux? 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.

      --
      It could be that the only purpose of your life is to serve as a warning to others.
    4. Re:Does this do something SFU doesn't? by R.Mo_Robert · · Score: 2, Insightful

      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 looking into. I think part of the reason some projects use Cygwin owes to their current or not-to-far-in-the-past support of Windows 9x/Me (the POSIX layer, of course, is only for the NT family) and probably no benefit (or perhaps even more problems, having to work out compatibility issues with yet another set of tools) from changing.

      --
      R.Mo
    5. Re:Does this do something SFU doesn't? by yuhong · · Score: 3, Informative

      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.

    6. Re:Does this do something SFU doesn't? by yuhong · · Score: 2, Informative

      But if you have that edition SUA should be available, which should be much better than SFU and should be used instead

    7. Re:Does this do something SFU doesn't? by bcat24 · · Score: 4, Informative

      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. :)

    8. Re:Does this do something SFU doesn't? by shutdown+-p+now · · Score: 2, 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 DLLs with your binaries, and that's it.

      SUA is supposed to be used for porting "legacy" in-house Unix applications. It does also make for a decent Unix shell and basic tool set for Windows if you can afford it, but aside from that, it's in a rather different niche from Cygwin. They are complimentary.

    9. Re:Does this do something SFU doesn't? by shutdown+-p+now · · Score: 2, Informative

      SUA is SFU, just a more recent version of it (that specifically supports Vista+).

    10. Re:Does this do something SFU doesn't? by cbhacking · · Score: 3, Informative

      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.

      --
      There's no place I could be, since I've found Serenity...
    11. Re:Does this do something SFU doesn't? by cbhacking · · Score: 4, Informative

      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.

      --
      There's no place I could be, since I've found Serenity...
    12. Re:Does this do something SFU doesn't? by cheesybagel · · Score: 2, Informative
      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 free compiler you could get. It still matters if you have a complex cross-platform application you want to compile using GCCisms (e.g. AT&T assembly notation, C99).

    13. Re:Does this do something SFU doesn't? by nimble · · Score: 2, Informative
      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.)
      - Bigger, more recent choice of packages. For example gcc, is 4.3 vs. SFU's 3.3.
      - Bash and zsh.
      - A usable default shell configuration. The arrow keys don't even work correctly in SFU's default ksh setup. (It's as if MS deliberately try to scare people off Unix.)
      - A choice of terminals to replace the awful Windows console.

      Also, what do you base your claim of SFU's better Windows integration on? Since Cygwin's based on the Windows API rather than being confined to its own subsystem, it can offer features like /dev/clipboard or /proc/registry, and it allows programs to mix POSIX and Win32 calls.

      Finally, Cygwin 1.7 does also support case sensitivity on NFS and on NTFS volumes that have that feature enabled.

    14. Re:Does this do something SFU doesn't? by SharpFang · · Score: 2, Interesting

      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.

      --
      45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
    15. Re:Does this do something SFU doesn't? by MightyMartian · · Score: 3, Insightful

      It's Subsystem for Unix-based Applications. There are two editions: a client edition (Vista, Windows 7) and a server edition (Server 2008). The client edition contains, well, clients; the server edition contains servers. This is probably where you got the idea that NIS and NFS servers are no longer supported: they are, but only in the server edition of SUA.

      Microsoft, fucking up userland since 1992.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
  3. makes windows marginally bearable by pydev · · Score: 5, Insightful

    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.

    1. Re:makes windows marginally bearable by RAMMS+EIN · · Score: 2, Insightful

      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 there.

      --
      Please correct me if I got my facts wrong.
    2. Re:makes windows marginally bearable by RDaneel2 · · Score: 2, Interesting

      No, SFU/SUA is not the same as Cygwin... it is an implementation of a POSIX(?) userland that sits directly on top of the NT kernel. Also unlike Cygwin, it does not rely on the Win32 subsystem. It comes with numerous GNU, System V, and BSD utilities. One of its design goals is to be "source compatible", so that in general only a recompile of Unix apps is required. And I, like many others, would like to know when the release of all the actual tools for Windows 7 and Server 2008 R2 version of SUA will show up... it has now been over 2 months since general release of Windows 7. Sigh.

    3. Re:makes windows marginally bearable by bvankuik · · Score: 2, Insightful

      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 ported. And Windows admins could just pick up any of the gajillion resources on Shell scripting, or visit a local Unix user group to pick up tricks.

      I know Powershell has lots of hooks that apps can hook into; that's basically the equivalent of Linux' D-Bus system.

    4. Re:makes windows marginally bearable by lena_10326 · · Score: 5, Informative

      ...but both SFU/SUA and Cygwin are pretty much just different shells on top of the limited cmd.exe window, unless you happen to use rxvt (which is usually not worth the trouble).

      What are you talking about? First, only lobotomized moron monkeys would use CMD.EXE. Second, put this

      C:\cygwin\bin\rxvt.exe -e /bin/bash --login

      into a windows short cut. Set "Start in" to c:\cygwin\bin and it works just fine. Now, how much work was that? Have you got 2 minutes to spare out of your day? Quit your bitchin. Wuss.

      What I use:

      C:\cygwin\bin\rxvt.exe -geometry 132x60+0+0 -fn "FixedSys" -e /bin/bash --login

      because the default font is ugly.

      --
      Camping on quad since 1996.
    5. Re:makes windows marginally bearable by lena_10326 · · Score: 2, Insightful

      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.

      --
      Camping on quad since 1996.
    6. Re:makes windows marginally bearable by cbhacking · · Score: 3, Insightful

      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. 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).

      --
      There's no place I could be, since I've found Serenity...
    7. Re:makes windows marginally bearable by daveime · · Score: 3, Interesting

      For *nix users, however, the reverse is usually true.

      Making the half-assed GUI so lousy that people will actually prefer a command line interface is not the right way to go about doing things

    8. Re:makes windows marginally bearable by NearlyHeadless · · Score: 2, Informative

      I used to use rxvt, but I couldn't get Unicode to work in it, so I switched to puttycyg.

    9. Re:makes windows marginally bearable by barrkel · · Score: 2, Interesting

      Copy and paste: getclip and putclip. But I usually abbreviate them to p and c with a couple of wrappers.

      I find Cygwin integrates really well with the rest of Windows, particularly when you mount the right drives in directories off the root, so that you have /c/ etc., but still have access to Win32 apps. I practically live in my bash/rxvt shell.

  4. Do we finally have unicode support? by Dwedit · · Score: 4, Interesting

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

  5. search! by spongman · · Score: 5, Informative

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

  6. Re:min req windows by BitterOak · · Score: 5, Funny

    who actually uses this... it REQUIRES windows?

    I know. I've been hoping for years they'll release a version for Linux, but they never do.

    --
    If I can be modded down for being a troll, can I be modded up for being an orc, or a balrog?
  7. Yes. by amake · · Score: 5, Informative

    Yes. From the announcement:

    - Default character set is now UTF-8, but other character sets are
        supported via an improved internationalization support. See
        http://cygwin.com/cygwin-ug-net/setup-locale.html

  8. I wonder if Cygwin really has much of a future by Anonymous Coward · · Score: 2, Insightful

    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 a full Linux distro, and have easier access to your local Windows files (via a local share) than Cygwin's fun mapping scheme (/cygdrive what now?). Or you can even run an EC2 instance. Cygwin was never painless enough to make it worth while to use, if I needed to do something in Linux I'd rather use a real Linux box.

    I don't think most people really miss the command line utilities enough to want to go through the hassle of using Cygwin (I hate the install process btw)... but then again I don't like using Linux as my desktop. I'd rather just use Windows or OS X and ssh into my Linux clusters as needed.

    1. Re:I wonder if Cygwin really has much of a future by nimble · · Score: 2, Informative

      Cygwin 1.7 does support case-sensitive filenames. See the User's Guide on how to enable it: http://www.cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive It's also had various other improvements in terms of POSIX compatibility, for example, characters not allowed in Windows filenames can now be used in Cygwin. Another one is that mount points are now stored in /etc/fstab rather than the registry. See the What's New section for lots more improvements: http://cygwin.com/cygwin-ug-net/ov-new1.7.html The Cygwin developers do have an official Linux compatibility goal, and fixes are going in all the time, but of course it's never going to be perfect, partly due to limitations of the underlying platform, and partly due to lack of (wo)manpower.

  9. Re:min req windows by compro01 · · Score: 4, Funny

    It works well using WINE.

    --
    upon the advice of my lawyer, i have no sig at this time
  10. Re:I was never really impressed by plasticsquirrel · · Score: 3, Interesting

    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.

    --
    Systemd: the PulseAudio of init systems
  11. Re:simpler explanation is by JustOK · · Score: 2, Funny

    Thank God for atheists!

    --
    rewriting history since 2109
  12. Re:I was never really impressed by nimble · · Score: 2, Informative

    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/

  13. WINE / Cygwin by DrYak · · Score: 4, Informative

    since when does WINE run under cygwin?

    It works both ways, although buggy and not fully functional.
    And as reported by parent poster, this two redundant monsters are used as test cases to assist developers in perfecting both software stacks (by investigating said bugs and lack of functionality)

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  14. Re:Did they simplify fork()? by nimble · · Score: 2, Informative
    I don't really know the details, but the possibility of using the underlying NT calls to implement fork has been discussed a lot on the Cygwin mailing list, and the conclusion was that it won't work for Win32-level processes. Dropping down into a separate subsystem like SFU would require a major redesign and would break binary compatibility for everything as well as source compatibility for Cygwin programs that use Win32 themselves, e.g. rxvt or mintty.

    Good points about avoiding fork where possible. spawn() is another way to do that.

  15. Re:Recommended alternative terminal program? by schnablebg · · Score: 2, Informative

    Console, a very nice application that has tabs, sane copy/paste functionality, and can be configured to launch bash or whatever you want. Not sure about Unicode.