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."
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."
Slow news day? (Score:5, Insightful)
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.
Re: (Score:2)
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
Can't even match Cygwin (Score:2, Insightful)
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.
Re:Can't even match Cygwin (Score:5, Interesting)
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?
Re: (Score:2)
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.
Re: (Score:2)
Zwaaaaa? Bash is GPL. Linux is GPL. Cygwin is GPL, and LGPL [cygwin.com]. Why would it be infringement?
Re:Can't even match Cygwin (Score:5, Insightful)
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.
Re: (Score:2)
Re: (Score:3)
So does Window's. Also of note is that Ubuntu with full X server runs too.
Re: Can't even match Cygwin (Score:1)
Serious question: Windows has an X server? I have successfully setup third-party Windows X servers with Ubuntu-on-Windows, but there is a first party one?
Re: (Score:3)
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
Re: (Score:2)
Re:Can't even match Cygwin (Score:4, Informative)
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.
Re: Can't even match Cygwin (Score:4, Informative)
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.
Comment removed (Score:5, Insightful)
Re: (Score:2)
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
Re: (Score:2)
Re: (Score:2)
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.
Re: (Score:2)
Re: (Score:2)
Re: (Score:1)
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.
Re: (Score:2)
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
Re: (Score:2)
> I am not a shill or troll for MS by a longshot but have you actually used Powershell?
Can you run commands that start with a number [slashdot.org], such as 7z.exe, yet ?
Re: (Score:2)
I actually run 7z.exe from one of my powershell scripts.... no problem... is it not supposed to work?
Re: (Score:2)
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
Re: (Score:3)
There's no one single way, but there are several much more useful ways such that files created through Windows have the expected permissions in Cygwin (user read/write) and files created through Cygwin are accessible in Windows (user can read and write them). There's no excuse for the Linux subsystem not being able to do something reasonable. And yes I've dealt with Cygwin files in Windows and Windows files in Cygwin. It works because Cygwin understands Windows ACLs (see POSIX accounts, permission, and secu [cygwin.com]
Updating? (Score:2)
He doesn't understand the system (Score:1)
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)
Re: (Score:2)
Re: cygwin (Score:2)
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
Re: (Score:2)
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.
Re: (Score:1)
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.
Re: (Score:2)
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
Re: (Score:2)
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.
Re: (Score:1)
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
Re: (Score:1)
Did you try Babun (http://babun.github.io/)? It add a packaging system to Cygwin and provide a nicer shell.
Re: (Score:1)
Re: (Score:2)
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.
Re: (Score:2)
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
Re: (Score:2)
It really isn't. Everything that Cygwin does, WSL does better.
Re: (Score:2)
Re: (Score:2)
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
Re: (Score:2)
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.
Yeah, I'll keep using Cygwin.
Re: (Score:2)
Looks like we've got major changes coming in this department soon:
https://blogs.msdn.microsoft.c... [microsoft.com]
Re: (Score:2)
There are bugs (Score:2)
It's new (Score:3)
Whatever it is, it's out and not "Linux" (Score:3)
Apparently Microsoft released it to the public.
Time will tell.
This tends to confirm the view that the GNU/Linux misnaming as "Linux" is really about denying cr
Re: (Score:2)
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.
Re: (Score:2)
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
Re: (Score:2)
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).
Re: (Score:2)
FTFY. The only thing that has changed is that MS doesn't currently see a way to do the extinguish part.
Re: (Score:2)
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...
Yes? (Score:3)
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.
Re: (Score:2)
Re: Yes? (Score:2)
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
Re: (Score:2)
Let's say I get apache to work.
Nope, network applications are specifically Not Supported.
Re: (Score:2)
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.
Re: (Score:2)
Oh it will install. But the network functionality that makes it worth running in the first place will be thoroughly broken.
Re: (Score:2)
Re: (Score:2)
The limitations are in unimplemented or incompletely implemented syscalls. If your interpreter runs, your custom scripts are likely to run as well.
Re: (Score:2)
Also, the headline fails at English. "There is bugs"?
Re:Yes? (Score:4, Funny)
I don't see the problem. "There is bugs. And here is elmer. And over there is daffy." Seems grammatically fine to me.
Re: (Score:1)
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
Re: (Score:2)
"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
Re: (Score:2)
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
It's a beta (Score:3)
There are bugs in a beta? What a shock!
Beta software has bugs. Film at 11 (Score:3)
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...
Re: (Score:2)
Re: (Score:2)
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
Re: (Score:2)
D'oh. Touted as something new. Lol.
I blame Google's keyboard on my phone.
Re: (Score:2)
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
emacs / fg (Score:2)
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.
There's Bugs In The Windows 10 Bash (Score:2)
I've just shit myself with surprise.
Re: (Score:2)
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.
The "bugs" aren't even in bash itself. (Score:2)
Samba runs under "Bash on Windows"! (Score:2)
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
Windows Ubuntu is NOT a replacement for Cygwin. (Score:2)
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
Are you serious? (Score:2)
There is no reason to try to do real things in it (Score:3)
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.
Don't review what you don't understand at all... (Score:2)
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
A solution desperately looking for a problem (Score:2)
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.
Scandinvaian (Score:2)
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.
Re: (Score:2)
Year of Linux on the Desktop... By Microsoft? (Score:2)
Who would have expected Microsoft to be one to finally achieve Linux on the Desktop?
Re: (Score:2)
... except they clearly haven't.
Just really devious marketing? (Score:2)
...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,
Re: (Score:2)
It's also great for programs that have trouble compiling under Cygwin, like dpkg. Other than that, better you use Cygwin. Or better yet, burn Windows and use Linux directly.
Is this article serious? (Score:4, Informative)
I have no doubt that the integration between Windows and the Ubuntu environment is bad, particularly with regards to the permissions. The POSIX vs. Windows permissions models are most likely to interact badly. There isn't a lossless mapping between the two, so something is bound to be lost. That being said, this article is absolutely horrendous.
Example:
2. “sudo su” VS Windows
This useful commands doesn’t work in the Shell and if you try it you will, at first receive a command line error, and second you have to restart your terminal because the command “cd” starts to work in a random way causing path problem.
Well, no kidding. First off, anyone who uses ‘sudo su’ instead of ‘sudo -i’ or ‘sudo bash’ should cease writing technical articles. Then there is no justification for the expectation that both sudo and su will somehow work as expected. That's the very thing I'm not expecting to operate the way I'm used to, since it is not running on a Unix-like system.
But the absolutely best part is that the text of the whole article is completely devoid of any useful information. The quote above has the details and the grammar of the guy who calls your technical support guy and tells “my server don't work,” and refuses to give you any more details until you accidentally discover they don't have an account at your company, they don't have a server but a Facebook page, and their internet connection is presently not working.
As I would never used Ubuntu Bash for Windows, I would have been curious to see what permissions would ‘ls -l’ see after a chmod. That detail is somehow missing from the “article”, which is a series of complaints and vain praises like “grep works correctly”. Yay.
Re: (Score:2, Funny)
Re: Is this article serious? (Score:3)
Chill out. Dude wrote a useful and informational article. Offer some constructive criticism but no need to sudo bash him by getting on his case.
Re: (Score:1)
without the extra dash, the environment's all wrong.
Re: (Score:2)
I sometimes run 'sudo su - foo' because a) unlike with 'su - foo' I have to enter the root password rather than foo's password, and b) unlike 'sudo -i -u foo -g wheel' it's quicker to type.
Then there is no justification for the expectation that both sudo and su will somehow work as expected.
Yes, there is. sudo does its job, su does its job. Where the hell did you learn unix so that you think there was something wrong about combining the two?
Re: (Score:2)
Re: (Score:2)
Re: (Score:1)
The console window for the start menu item "Bash on Ubuntu on Windows" (terrible naming by the way) is already in quick edit mode, you don't need to right click the titlebar.
I prefer "Bash on Windows" a not so terrible naming by the way. :-)
Re: (Score:2)
Re: (Score:2)
I can't figure out any way to select, copy and paste text in a bash window. Quite a limitation for a shell.
...by which you mean "quite a limitation for a terminal emulator window"; that's not the shell doing that, any more than it's doing select, copy, and paste in xterm or gnome-terminal or rxvt or Konsole or Terminal or....
And, yes, if it's using the same terminal emulator code that a cmd.exe window does, select/copy/paste is a pain, especially to those used to either the "middle button pastes the current selection" model or the Shift+(Control-C,Control-X,Control-V) model, as are used in many UN*X terminal em
Re: Which software does not have bugs? (Score:1)