Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
Microsoft GUI Operating Systems Ubuntu Windows X Linux

There's Bugs In The Windows 10 Implementation of Bash (altervista.org) 163

First-time submitter Big O Notation shares "an honest review about the new Ubuntu Bash" that shipped with the Windows 10 Anniversary Update. While it's still officially beta, most of the commands work as expected, and it includes popular programs like the Pico text editor. Here's some of the review's highlights: Pros: You can also manage and manipulate other files inside your entire Hard Disk, even those outside of your Linux home directory.
Cons: Even if you chmod something properly, when you use ls -l the Bash would not show the correct permissions. [And] if you try to create a Folder in your Linux Home Directory by using the Windows GUI, it would be impossible to read and manage it. Don't try this at home.

Microsoft says they've included the Windows Subsystem for Linux primarily as "a tool for developers -- especially web developers and those who work on or with open source projects." One Scandinavian developer has even tried running X on Bash on Ubuntu on Windows, reporting success running simpler programs like xcalc and xclock, as well as Gnome Control Center and xeditor and SciTE. "Things start to fall apart if you try to get more ambitious, though."
This discussion has been archived. No new comments can be posted.

There's Bugs In The Windows 10 Implementation of Bash

Comments Filter:
  • Slow news day? (Score:5, Insightful)

    by Anonymous Coward on Sunday October 16, 2016 @04:44PM (#53086947)

    That "review" is tiny and doesn't really tell you much. It doesn't even say what happens if you do mess with the Linux subsystem directories from Windows apart from "it would be impossible to read and manage it". Grats for random guy getting a ton of ad hits on a crappy 5 minute blog post. Woo.

    • It's also written by someone who has no clue what they're talking about "Windows 10 implementation of Bash", really? It's called WSL, and it runs native Linux binaries. There's no implementation of Bash there other than the one that's in Ubuntu.

      As for the bugs, it's the inevitable outcome of trying to cram a Linux filesystem in an NTFS directory (which is there for the ease of installation and convenience). If you want the real thing with 100% fidelity, loop mount ext4 (of course, then you lose easy access

  • So basically MS's Linux subsystem can't even do the job Cygwin does quite nicely? I think MS ought to go and read the code, learn some lessons and carry it back. It's not like you can't translate Unix permissions to Windows' permissions system and vice-versa, the code's even right there to read.

    • by Rosco P. Coltrane ( 209368 ) on Sunday October 16, 2016 @05:05PM (#53087013)

      I think MS ought to go and read the code, learn some lessons and carry it back

      They haven't done that in 4 decades. Why would they start now?

      • by donaldm ( 919619 )

        I think MS ought to go and read the code, learn some lessons and carry it back

        They haven't done that in 4 decades. Why would they start now?

        I think Microsoft's attitude of "If it ain't invented here" is a big stumbling block. Afterall Cygwin [wikipedia.org] has been around since 1995 and must have been doing something right.

    • by thegarbz ( 1787294 ) on Sunday October 16, 2016 @05:08PM (#53087021)

      That depends on what you call match or what you call quite nicely. By all accounts Microsoft's effort has well and truly blown Cygwin out of the water in terms of both speed and ability to get things running.

      Also if you think Cygwin was feature complete and bug free with version one then you're utterly delusional.

      • Cygwin's X server actually works
      • Not by all accounts at all, there system is more like a VM that you can run linux in.

        for example want to git, go apt-get install git great but if you want to use it outside of the shell install it again for windows.

        cygwin I can run windows executables in it and cygwin executables from windows.

        accessing the linux file system is a bit contrived from windows, some app data directory under the users directory I think

        ping, sudo doesn't work (at least when I tried it)

        For now I will stick to cygwin

    • by Darinbob ( 1142669 ) on Sunday October 16, 2016 @06:01PM (#53087241)

      Cygwin mostly uses a thick compatibility layer that slows things down a lot but makes things really compatible with Unix, such that you need no or minimal effort to get off the shelf unix software to run under it. So it's great in the sense that you get what you expect, but it always feels just a wee bit slow.

    • by Billly Gates ( 198444 ) on Sunday October 16, 2016 @06:01PM (#53087243) Journal

      That's a little extreme.

      Cygwin is very outdated and uses translated calls from POSIX to win32 with all the bugs and glory on both platforms combined.

      Last I checked you couldn't run major products. Also what good is it? Everything in Windows is an object, not a text file. You cannot cat your event viewer files nor can you use awk, sed, and grep for WMI on your PC. MS is native and more apps are supported.

      This is 2016. If any geek is stuck on Windows or Linux and need an app on another platform you run a virtual machine. Let Linux be Linux and Windows be Windows. Win 10 has Hyper-V and virtual box and qemu is free on Linux.

    • by Ash-Fox ( 726320 ) on Sunday October 16, 2016 @06:05PM (#53087267) Homepage Journal

      So basically MS's Linux subsystem can't even do the job Cygwin does quite nicely?

      Cygwin can't run native Ubuntu elf executables which is wehat the Linux subsystem does.

      I think MS ought to go and read the code, learn some lessons and carry it back.

      How would that help? Cygwin doesn't execute native ELF executables to begin with.

      It's not like you can't translate Unix permissions to Windows' permissions system and vice-versa, the code's even right there to read.

      Cygwin depends on extended meta attributes though rather than just translating alone?

      • So basically MS's Linux subsystem can't even do the job Cygwin does quite nicely?

        Cygwin can't run native Ubuntu elf executables which is wehat the Linux subsystem does.

        I probably missed the gazillion times this point was raised, but why is this a thing? I get it that you can just run "the same file" but why bother. The linux subsystem is not even close to be a real production environment so you can't validate anything on it anyway. There are so many ways to get a good linux environment that are both way closer to the real thing and can run native binaries (obviously).

        As a developer, I honestly don't see the use case here when I can either run a VM, dualboot, or for most s

        • by Ash-Fox ( 726320 )

          I probably missed the gazillion times this point was raised, but why is this a thing?

          Likely to support proprietary Linux software and do some Linux development too.

          The linux subsystem is not even close to be a real production environment so you can't validate anything on it anyway.

          Honestly, outside of the kernel interfaces which had most common interfaces implemented and a few permission issues, it's a pretty good approximation for real time development of Linux software on Windows in my opinion.

          There are

        • As a developer, I honestly don't see the use case here

          These tools are not for you. They are for devops in cloud environments so that they can use the same tools across the board regardless of kernel.

    • I tried it briefly and found that commands such as htop and nload didn't work. So it seems like little the Linux sub-system is little more than a curiosity at present.
    • Cygwin sometimes throws the strangest errors, and when searching for info I find lots of dev comments on how support for various things that don't exist natively in Windows often had to be hacked together and doesn't always quite work. Cygwin is a giant hack, and while it's a hack that for the most park works quite nicely, I am glad to see MS take a stab at it.
    • by Dracos ( 107777 )

      MS has spent over two decades ignoring the CLI shell; they don't care about it and don't understand it, they only understand GUI. Powershell is proof of that, only people who have disdain for CLI would produce that absurdly verbose monstrosity.

      • MS has spent over two decades ignoring the CLI shell; they don't care about it and don't understand it, they only understand GUI. Powershell is proof of that, only people who have disdain for CLI would produce that absurdly verbose monstrosity.

        I am not a shill or troll for MS by a longshot but have you actually used Powershell?

        There are somethings I dare say gulp I like about powershell over Bash. True MS made the mistake in the NT days of assuming the system admin would be sitting in front of the server in the MDF unlike a Novel Netware or Unix box which assumes you use a tty or console from elsewhere.

        From looking at Server 2016 with the whole Nano Server edition I would say it is IMPOSSIBLE to admin such VM's without powershell. Now the directi

      • Ever since at least 2007, it seems like all of the new admin GUIs on Windows are really just a wrapper around PowerShell commands.

        This makes me think that CLI is the primary focus and has been for a while now.

        As a matter of fact, even before 2007, to do anything truly advanced, you had to resort to the CLI... it is just that the CLI tools were all discrete and were only as good as the team that created them. Now they are all being unified under PowerShell.

        PowerShell is very capable and actually fun to scrip

  • There is at least one post online floating around how to update to ubuntu 16. I dont know how much info there is about fixes in function, or consequences thereof.
  • by Anonymous Coward

    Permissions will only work correctly within the linux filesystem. When you're accessing folders on the Windows side through bash, it does a necessarily-lossy mapping.

  • cygwin (Score:5, Informative)

    by phantomfive ( 622387 ) on Sunday October 16, 2016 @04:55PM (#53086977) Journal
    For now, it's still better to use Cygwin.
    • by Gr8Apes ( 679165 )
      For now, it's still better to use any *nix distribution, even a systemd one.
    • Can you apt-get install to run any binary? I hate cygwin with a passion.

      These days I do virtual machines. Cygwin provides no value if you need to run modern apps bugfree. Same with Linux guys who do wine. If you need to run Windows than do it in a vm

      • I hate cygwin with a passion.

        Sounds like an unemotional, clear-minded, rational, unbiased opinion there.
        The election season has probably helped clear your mind. I've noticed that many people have been speaking very rationally in the news lately.

      • Can you apt-get install to run any binary? I hate cygwin with a passion.

        btw, you can use cygwin's package manager which has taken care of all that for a long time.

      • by caseih ( 160668 )

        Yup you can apt-get install anything in the Ubuntu repositories. Including many things that won't yet run properly, since the Linux layer isn't complete.

        I've run Xming and many graphical apps in it, though, including Firefox, and many apps from the Mate Desktop (requires fiddling to fix dbus though).

        I've used Cygwin for many years and it's still useful like it always was, mainly for scripting and remote-access stuff (sshd). It's obviously not for you since you, but it's been invaluable for me. Of course

        • I've used Cygwin for many years and it's still useful like it always was, mainly for scripting and remote-access stuff (sshd).

          Forgot about that one. SSH under cygwin is so much nicer, that I've installed Cygwin just for that before.

      • by donaldm ( 919619 )

        Can you apt-get install to run any binary? I hate cygwin with a passion.

        These days I do virtual machines. Cygwin provides no value if you need to run modern apps bugfree. Same with Linux guys who do wine. If you need to run Windows than do it in a vm

        Why would you want to use a Debian base package maintainer in Cygwin it has it's own installer/maintainer?

        If I wish to use "apt-get" I would install a Debian-based distribution either native or in a virtual machine. If I wish to use "dnf" I would install a Redhat based distribution either native or in a virtual machine. It normally takes me about an hour to install a fully customized distribution.

        Personally, for home use I prefer the native approach for Linux and virtual machines for other distribution

      • Did you try Babun (http://babun.github.io/)? It add a packaging system to Cygwin and provide a nicer shell.

      • apt-cyg [github.com]
      • There are a few wrappers with nearly the same syntax as apt for cygwin, meaning you don't have to run the cygwin installer to do package installs / dependency calculations.

        Check out Sage sometime, makes the occasional install in a cygwin environment a breeze.

      • by klui ( 457783 )

        I may be in the minority but I have a Windows machine as my main workstation and I use cygwin as an interface to console applications for interfacing with UNIX machines. If I need to manage Windows boxes, I'll use Powershell, but if I want to check out things or remotely script simple stuff on UNIX machines I like using cygwin.

        Therefore I tend to install apps like ssh and tmux. Occassionally I would issue a wget command here and there, or a Q&D Python script. I don't run X applications--I have Linux VMs

    • It really isn't. Everything that Cygwin does, WSL does better.

      • Does WSL let you interact with Windows binaries/filesystems yet?
        • Interaction with filesystem has always been available out of the box - you get /mnt/c, /mnt/d etc.

          It works the other way around, too, since WSL filesystem is just an NTFS folder. However, because WSL uses some custom attributes to describe inode semantics, which Win32 knows nothing about, writing into WSL filesystem from Win32 is not advisable.

          Launching Windows executables from command line isn't supported out of the box. You're right, this is one use case where Cygwin is better for now. But there are sever

  • That are plural. And a bug which is singular. A bug in bash is singular, indeed.
  • by wjcofkc ( 964165 ) on Sunday October 16, 2016 @05:09PM (#53087025)
    MS has stated that this is very new and very buggy but that they are working on it. It is not yet for public consumption. MS has been embracing Open source minus the extinguish part for some time now. Linux (okay so not the kernel but still) on Windows outside of a virtual machine is everything a lot of people have wanted but never thought would happen. Go watch some of the MS demo videos. As a Linux user since 1996, I can attest that there is absolutely nothing that will make the broader Linux crowd happy. Hence, most of the Linux crowd are not actual techies.
    • MS has stated that this is very new and very buggy but that they are working on it. It is not yet for public consumption.

      Apparently Microsoft released it to the public.

      MS has been embracing Open source minus the extinguish part for some time now.

      Time will tell.

      Linux (okay so not the kernel but still) on Windows outside of a virtual machine is everything a lot of people have wanted but never thought would happen.

      This tends to confirm the view that the GNU/Linux misnaming as "Linux" is really about denying cr

      • by SEE ( 7681 )

        No, sorry, you misunderstand.

        Cygwin is GNU for Windows. It compiles and puts the GNU system on Windows.

        "Windows Subsystem for Linux" is not GNU for Windows. It is subsystem for executing compiled-for-Linux ELF binaries on Windows. It's a Linux subsytem/ABI on Windows much like Wine is a Windows subsystem/ABI on Linux. You can run GNU software compiled for Linux on it, because it implements the Linux system calls on Windows, but it is not a port of GNU software to the Windows kernel.

        • by jbn-o ( 555068 )

          Thanks for the clarification. Are people meant to run other OSes but GNU atop Windows Subsystem for Linux? I've not heard of anyone doing this nor have I seen any announcement this was intended.

          So GNU doesn't come with this, but one runs ELF binaries (Ubuntu's 14.05 release, for instance) on Microsoft's Windows Subsystem for Linux to effectively get GNU. Since this ostensibly doesn't include the Linux kernel this wouldn't qualify as GNU/Linux either.

          Functionally, however, I don't see a great deal of differe

          • by PCM2 ( 4486 )

            Functionally, however, I don't see a great deal of difference between this and Cygwin as in both cases one ends up with a lot of the same programs running atop Microsoft Windows.

            For some value of "functionally," perhaps not -- at least not for now. But in future, maybe, if you wanted to test against some Linux software and you needed to be sure you're using the actual binary that ships with an actual, commercial distro, you could potentially do that with Windows Subsystem for Linux (but you could never do it with Cygwin).

    • MS has been embracing Open source and delayed the extinguish part for some time now.

      FTFY. The only thing that has changed is that MS doesn't currently see a way to do the extinguish part.

      • heh With all of the Linux distros out there, the "extinguish" part of that equation is pretty much IMPOSSIBLE.. Oh sure, MS could buy Canonical/Ubuntu, but that sure isnt gonna "extinguish" Linux... hehe I'd love to see them *try*... Having left the MS ecosystem completely about 6 years ago, I laugh my ass off at the bullshit MS pulls on those who still use their products...

  • by fuzzyfuzzyfungus ( 1223518 ) on Sunday October 16, 2016 @05:17PM (#53087061) Journal
    It doesn't seem like much of a surprise that starting a fight between POSIX and NT ACLs is going to end badly; but this 'review' fails pretty dramatically at answering the question of how much of a problem this is.

    If you can't, in practice, let the Linux side touch the Windows side, or vice versa, lest ugly and inscrutable things happen, then you might as well just run a VM. If you can actually do a variety of interesting things across systems, so long as you avoid a few edge cases, that is potentially more useful.
    • by truedfx ( 802492 )
      You don't have to reserve memory and disk space like you do for a VM, you don't have the boot time of a VM, you can install Ubuntu's packages and have most of them actually work, even ones that haven't been tested, even without recompilation like for Cygwin, and you can safely read and write the files on the Windows side that you have access to. It's useful.
      • Is it production ready?

        Let's say I get apache to work. Excellent. Now I have some scripts from Bob my coworker uses and some custom XML APIs for PHP to get my web app up. Will they work? Probably not.

        Any i5 with 8 to 16 gigs of ram with an SSD can do a VM lightning fast. Specially a type 1 like Hyper-V or KVM/qemu. Most developers and even hipsters posses such specs easily and Hyper-V and virtual box are there and work.

        Use a VM or better yet an Amazon e3 vm to do your development work with no headaches

        • by Mal-2 ( 675116 )

          Let's say I get apache to work.

          Nope, network applications are specifically Not Supported.

          • I did an apt-get install Apache2 and it installed :-)

            Now I didn't check to see if it worked as a have separate VM's of turnkey Linux appliances for those. MS wanted to include this because they are worried of becoming irrelevant to young millennials who make web pages and mobile apps so things like Apache was one of the goals of making WSL in the first place.

            • by Mal-2 ( 675116 )

              Oh it will install. But the network functionality that makes it worth running in the first place will be thoroughly broken.

        • by deniable ( 76198 )
          It's not production ready and designed for clients only. There is no server support. It's mostly a help for devs that live on Windows but have to run Linux tool-chains.
        • by truedfx ( 802492 )

          Now I have some scripts from Bob my coworker uses and some custom XML APIs for PHP to get my web app up. Will they work? Probably not.

          The limitations are in unimplemented or incompletely implemented syscalls. If your interpreter runs, your custom scripts are likely to run as well.

    • by AmiMoJo ( 196126 )

      Also, the headline fails at English. "There is bugs"?

    • by Anonymous Coward

      This was my thought too. POSIX permissions do NOT map 1:1 to NTFS permissions. NTFS permissions are amazingly detailed basically inherited from its NETWARE and VMS 'roots' that they set out to replace.

      There is some stuff that maps out but there are many use cases that just do not even exist in POSIX and the other way around. That it probably works as good as it does is probably just amazing by itself.

      For example a file can be 'owned' by any number of groups in windows. But in POSIX it belongs to one gro

      • "For example a file can be 'owned' by any number of groups in windows. But in POSIX it belongs to one group. In NTFS I can do things like user 1 can change the permissions but not read the file but user 2 can not even look at the file (will not see it in the listing) but can modify the permissions. Totally contrived but possible to do. I am not totally sure you could actually pull that off in a posix sort of system."

        Well, yes, you probably could do that. But I've always wondered if the potential for the sm

    • It doesn't seem like much of a surprise that starting a fight between POSIX and NT ACLs is going to end badly; but this 'review' fails pretty dramatically at answering the question of how much of a problem this is.

      If you can't, in practice, let the Linux side touch the Windows side, or vice versa, lest ugly and inscrutable things happen, then you might as well just run a VM. If you can actually do a variety of interesting things across systems, so long as you avoid a few edge cases, that is potentially more useful.

      Mod parent up.

      I was thinking something similiar and not having CHMOD change an attribute is a feature.

      NTFS and the NT kernel do not understand Unix ACLs and permissions. If you Chmod something you can break it as the NTFS.SYS driver will assume the data is corrupt.

      While I think the WSL is a fun hack it is not practical as both systems were never designed to work with each other. Modern Windows is more akin to VMS than to Unix even if they do share some same features the implementations are different

  • by Kethinov ( 636034 ) on Sunday October 16, 2016 @06:04PM (#53087261) Homepage Journal

    There are bugs in a beta? What a shock!

  • The summary even states that Microsoft still officially consider it beta software. This is not even a v1.0 release.
    What we are seeing here however is that even a large ship such as Microsoft can turn very slowly. This would have been unthinkable even 5 years ago - just think what it will be like in another 5 years...

    • It may not matter much in 5 years unless Microsoft starts listening to the criticisms regarding Windows 10.
    • What's old is new again. NT 3 shipped with a (supposedly fully) POSIX layer, along with an OS/2 layer, and a Win16 layer. I forget the proper name for them, but it was along the lines of personalities.

      Later versions incorporated bits of OpenBSD userland to support networked UNIX systems.

      Then it was all removed and retired somewhere in the Vista/7/8 era.

      And now it's being resurrected and tired as something completely new. : Shakes head:

      Young whippersnappers who don't know their history are bound to repeat it

      • D'oh. Touted as something new. Lol.

        I blame Google's keyboard on my phone.

      • You're thinking of Services for Unix (SFU) - that was part of it, and the other part was the POSIX-compliant API that Windows NT 3.1 was based on (and remember that NT 3.1 was really NT 1.0).

        Windows also incorporated code from BSD (as it was more freely licensed than Linux) - from memory most of the TCP/IP stack was based on BSD's stack. I don't think it came from OpenBSD though - more likely to have come from FreeBSD or one of the other distros.

        I think that the POSIX layer was more that it complied with th

  • I can't even get Emacs to suspend and then return to the foreground in WSL Bash/whatever. The terminal program inevitably seems to get confused, and things get borked.

    The convenience of apt-get is outweighed by general unpredictability that is even worse than Cygwin.

    Honestly, Windows 10 + WSL very nearly got me to buy a Windows laptop as my primary computer, but it just isn't there yet.
  • I've just shit myself with surprise.

    • Well... if you would have made a break for the bathroom instead of making a post on the Internet... I am thinking that things might have worked out better for you.

  • I must say that I'm completely underwhelmed by the reviewer's knowledge of his subject because ignoring bash itself, only two of the commands listed (cd and the two redirection commands, > and >> ) are built into bash. The rest of them are separate programs that are called by bash. And, calling a package of Linux utilities by the name of the included shell program doesn't exactly increase his credibility.
  • While so many seem to see another chance to put the boot into Microsoft, others of us, who work in interoperability every day, are really quite excited by this tool. I was pleasantly surprised when Garming Sam, my colleague at Catalyst and fellow member of the Samba Team, wrote this article on how to run Samba under bash on Windows:

    https://www.samba.org/~garming... [samba.org]

    The fact that Microsoft is implementing the POSIX API, and even more, the Linux ABI, seriously is really cool, and shows that something seems to

  • The Ubuntu environment provided is not merely a POSIX-layer, it is a native environment capable of running Linux ELF binaries. This is not done by providing compatibility libraries but by actually providing quasi-kernel layer functionality in a (memory-resident?) environment. Each approach offers strengths and weaknesses.

    .

    The Cygwin layer has a long track record of success in providing a POSIX layer with some notable exceptions. There no native software management layer (forcing reliance upon the downl

  • I can't bring myself to read the article because in the summary this guy is confusing 'ls' with 'bash'. Can we get someone who actually knows what they're talking about to write about it?
  • When you can simply install actual proper Linux in a free VM like VMware Player or Virtualbox, there's really no reason to mess around with this stuff unless you're actually using it specifically for what Microsoft suggests you should use it for. Cygwin is better for just providing a Unixlike environment on Windows if that's what you want, and a VM is still better for compatibility if that's what you need.

  • Seriously. The author seems to have no idea what the Windows Subsystem for Linux is nor how it works. There are separate file systems for a reason. The things the author tries are exactly the things Microsoft make it very clear will be very problematic at best.

    The POSIX model and the Windows model of permissions are completely different. Instead of trying to map between the two (something Cygwin does variably well, sometimes really badly), they provide a file system with the semantics needed. Finally, there

  • Quite frankly, everyone I know wants to move AWAY from Windows 10 and TOWARDS Linux, with their only problem being that certain Windows programs don't run nicely on Linux, and that certain hardware only has Windows support.

  • One Scandinavian developer has even tried running X on Bash on Ubuntu on Windows,
    There is no such thing as a Scandinavian developer. He is either Swedish, Norwegian or Danish (in this case Norwegian). You can refer to Scandinavian developers in plural, such as in "Scandinavian developers are lazier than Mediterranean developers", but no single developer is Scandinavian.
  • So I write command line software. If a user messes up the command line, I display a Usage message. This uses argv[0], which is basically 'the executable name'.

    When I run Windows bash, the pwd command shows '/c/test'. When I run test.exe I'd expect argv[0] to be '/c/test/test.exe'. It isn't, it is the Windows native 'C:\TEST\TEST.EXE'.

  • Who would have expected Microsoft to be one to finally achieve Linux on the Desktop?

  • ...so in short its not trustable.
    This whole "putting Linux under Windows and making sure it sucks" thing seems like Microsoft's actual purpose was to come up with a clever way to make inexperienced people think Linux must be significantly worse than Windows,

A computer lets you make more mistakes faster than any other invention, with the possible exceptions of handguns and Tequilla. -- Mitch Ratcliffe

Working...