The state of Ubuntu on Windows



  • It's a beta in a fast ring Windows preview build. It shows. 1/10 would not recommend.

    Exhibit 1: I hope you like ed

    https://gfycat.com/GlassPerkyKillifish

    Exhibit 2: even /dev/null is broken

    root@localhost:~# file /dev/null
    /dev/null: ERROR: invalid mode 00
    

    Exhibit 3: what's an interoperability?

    PS C:\Users\badpa> echo 2 | Bash -c 'wc -c'
    Error: 0x80070057
    PS C:\Users\badpa> Bash -c "echo $(echo 2) | wc -c"
    2
    

    Exhibit 4: literally the first thing I did

    PS C:\Users\badpa> Bash
    root@localhost:/mnt/c/Users/badpa# ls
    ls: cannot access Application Data: Input/output error
    ls: cannot access Cookies: Input/output error
    ls: cannot access Local Settings: Input/output error
    ls: cannot access Menu Start: Input/output error
    ls: cannot access Mijn documenten: Input/output error
    ls: cannot access NetHood: Input/output error
    ls: cannot access Netwerkprinteromgeving: Input/output error
    ls: cannot access Recent: Input/output error
    ls: cannot access SendTo: Input/output error
    ls: cannot access Sjablonen: Input/output error
    AppData
    Application Data
    ...
    

    Exhibit 5: where are my files?

    root@localhost:~# ls /mnt/c/Users/badpa/AppData/Local/lxss/rootfs/root
    root@localhost:~# pwd
    /root
    root@localhost:~# ls -a | wc -l
    10
    

    Basically the only way to make this useful would be to manage and get an ssh daemon running on both sides of the system, so that programs have a way to exchange bytes and talk to each other. This is in no way better than running your own VM, just a lot more broken. Given how broken UoW is, this is not trivial.



  • @bp_ I knew they just reinvented virtualization in a lousy way.

    Besides, modern Linux infrastructure is far more than a shell. Custom services that are a breeze in all unixes, are a royal pain in the ass on windows. Do they port systemd as well?



  • @bp_ Also, Cygwin sucked, but this is outright atrocity. They'd better invest in making Cygwin suck less.


  • Discourse touched me in a no-no place

    @bp_ So normal Ubuntu then ⭐:trollface:



  • @wft The only real problem with cygwin is that there's not a lot of software in its repos. I'm otherwise a satisfied customer.


  • Discourse touched me in a no-no place

    More seriously though - it's a preview from a developer branch. It's not going to work perfectly.

    We know that there are some rough edges and that some things will break! Do not expect every Bash script and tool that you run will work perfectly



  • @bp_ also, abysmal locale support last when I looked at it. Actually, all iconv/Unicode/console related stuff was amazingly broken in funny ways. Maybe they have fixed it now, given console in Windows is less of a shit now than it was.

    What it would also benefit from would be some libasound compatibility layer so programs using ALSA can be ported with minimum effort.



  • @loopback0 you know, not that broken. They should really vet it before releasing, otherwise it looks and feels like a bad April fools joke.


  • kills Dumbledore

    @wft said in The state of Ubuntu on Windows:

    modern Linux infrastructure is far more than a shell

    Citation needed



  • @wft cygwin runs by default in some sort of putty
    window that knows how to make the terminal work properly.

    I suspect most of the problems with Windows' terminal emulation actually go down to /n vs /r/n though.


  • BINNED

    @bp_ I wish that was true. I had a bright idea of writing a terminal emulator once. It took me 20 minutes of reading the kind of madness that happens in there to completely and utterly banish the thought from my mind forever.

    Basically, somewhere in the bowels of it all, behind your fish shell showing bouncing emoji, there is a piece of code trying its damned hardest to translate it to some Chulhu-forsaken terminal standard from 1970s.



  • @Onyx oh I know. See also the homepage of mosh.

    “ISO 2022 locking escape sequences oh flying spaghetti monster please kill me now.”
    — actual USENIX peer review from the Mosh paper.


  • BINNED

    @bp_ I have no idea what a "locking escape sequence" is, and, for once, I shall revel in my ignorance.



  • @wft said in The state of Ubuntu on Windows:

    @bp_ also, abysmal locale support last when I looked at it. Actually, all iconv/Unicode/console related stuff was amazingly broken in funny ways. Maybe they have fixed it now, given console in Windows is less of a shit now than it was.

    What it would also benefit from would be some libasound compatibility layer so programs using ALSA can be ported with minimum effort.

    Since as Michael Kaplan mentioned years ago, the Windows console does not process Unicode correctly because of compatibility problems. I'm not surprised if in the end they can't get all the LC_* environment settings work properly in console input/output.

    Btw, seems www.siao2.com is currently out of service. Let's hope it's really just be out of service temporarily.



  • Once I read a bit into the limitations of this bash for windows thing, my enthusiasm evaporated. No services. No running Windows programs from within the shell. Separate directory structure.

    As usual, Microsoft has the correct idea, but then implements it in the most stupid half-assed way imaginable. See also: package management, Windows 8.1 start button.

    IMO cygwin and msys2 will remain a better option for many months to come. That's assuming MS will even keep improving this thing and won't just abandon it like so many other projects.



  • @cartman82 You know, Linux + Wine is far, far better in terms of integration and even actual compatibility than this knocked-together abomination from hell. What the actual fuck, I remember running coLinux back in the day when AMD64 was only starting to make news headlines, and it was very much like this, except that it was a lot less buggy.



  • @cartman82 Also, you can't do symlinks. Which kind of kills my use case for this.


  • Discourse touched me in a no-no place

    Second, while you’ll be able to run native Bash and many Linux command-line tools on Windows, it’s important to note that this is a developer toolset to help you write and build all your code for all your scenarios and platforms. This is not a server platform upon which you will host websites, run server infrastructure, etc. For running production workloads on Ubuntu, we have some great solutions using Azure, Hyper-V, and Docker, and we have great tooling for developing containerized apps within Windows using Docker Tools for Visual Studio, Visual Studio Code and yo docker.
    Third, note that Bash and Linux tools cannot interact with Windows applications and tools, and vice-versa. So you won’t be able to run Notepad from Bash, or run Ruby in Bash from PowerShell.

    Considering the highlighted, why would you expect to launch a Windows application from the Linux tools? That doesn't fit their use case.



  • @Jaloopa said in The state of Ubuntu on Windows:

    Citation needed

    One can have a fully working bash on Windows for ages in multiple flavors (Msys, Cygwin). Doesn't make Windows a Unix.
    Again, Linux is not a fucking shell. I can run explorer.exe in Wine, it doesn't make Linux Windows.



  • @bp_ would you mind linking to how to install, or give some quick pointers? I installed a redstone iso on fast build to virtualbox and couldn't find the ubuntuness.



  • @wft said in The state of Ubuntu on Windows:

    Do they port systemd as well?

    Does systemd do anything that Windows hasn't done about 47 times better for 15 years? I'm seriously asking.


  • kills Dumbledore

    @wft said in The state of Ubuntu on Windows:

    One can have a fully working bash on Windows

    Then what's the point of Linux?



  • @wft said in The state of Ubuntu on Windows:

    What it would also benefit from would be some libasound compatibility layer so programs using ALSA can be ported with minimum effort.

    What would be the point of that if it's CLI-only? When/if they port a window manager, then come back and ask.

    If you want to use your software like it's 1979 at all times, then I'm sure you're perfectly happy with the audio landscape of 1979. Which is to say, beep.


  • ♿ (Parody)

    @Jaloopa said in The state of Ubuntu on Windows:

    Then what's the point of Linux?

    Someone around here linked to something (in Quick Links?) saying that a big reason for MS to do this was to give web developers who are already familiar with linux tooling easy access to that sort of stuff, like ruby or redis.

    Apparently redis in particular has refused to port to Windows. And while apparently MS ported it, you're not running what you'll be using in production, so this enables you to locally run the same binary you'll have deployed elsewhere.

    It wasn't an official MS statement, but I can easily imagine that was part of the actual goal.



  • @boomzilla ruby and redis, do you mean it will be possible to run :disco: 🐎 on Windows?


  • Java Dev

    @blakeyrat said in The state of Ubuntu on Windows:

    @wft said in The state of Ubuntu on Windows:

    Do they port systemd as well?

    Does systemd do anything that Windows hasn't done about 47 times better for 15 years? I'm seriously asking.

    I don't know about 47 times better, but pretty much all of what systemd does has to do with services, which they're not supporting. This'll probably run in the style of the typical docker container, without a traditional init process.



  • @PleegWat said in The state of Ubuntu on Windows:

    I don't know about 47 times better, but pretty much all of what systemd does has to do with services, which they're not supporting.

    Windows has supported services since like 1993. So... wat? Are you honestly ignorant of that, or what the fuck man? EDIT: unless by "they" you mean "Ubuntu"? I guess?


  • Java Dev

    @blakeyrat which they're not supporting on the linux-in-windows thing. Of course I know windows has services.


  • Discourse touched me in a no-no place

    @fbmac said in The state of Ubuntu on Windows:

    @boomzilla ruby and redis, do you mean it will be possible to run :disco: 🐎 on Windows?

    In 10 8 years perhaps.



  • @PleegWat I don't even get what you're saying. Services are applications. What the hell does a shell language like Bash have to do with running applications? Are you saying Windows won't run service applications compiled for Linux? Because that appears, to me at least, to be a: duh.

    This isn't "making Windows into Linux", this is just "running Bash on Windows." Making Windows binary-compatible with Linux applications is way out of scope.



  • @blakeyrat said in The state of Ubuntu on Windows:

    Does systemd do anything that Windows hasn't done about 47 times better for 15 years? I'm seriously asking.

    I'm not aware of anything Windows does even 1.5x better. Cannot answer a wrong question.

    If I want a background, non-interactive service to run either system-wide or in my user session, it's a matter of creating an INI file in an appropriate location and firing two commands. In Windows, where do I look? Oh, there's special API for that, the program has to be written in a special way to even qualify as a service, there's a metric fuckton of registry in addition to that.

    Fuck it, seriously, with a damn sequoia log.


  • Java Dev

    @blakeyrat Making windows binary-compatible with linux is what they're doing. They're not recompiling bash. Which is stupid in and of itself because linux mostly isn't a binary standard.

    Services in llinux are exactly like normal applications in linux, except they're not associated with a TTY. As they're not the focus area microsoft is implementing, so kernel or userspace interfaces that are commonly used by services but only rarely by command-line applications will have a very low priority.

    systemd mostly concerns itself with scheduled jobs and starting/stopping services on boot/login. If you wanted to run linux services on windows, you'd need at least one of systemd, upstart, or sysv init to work.



  • @wft said in The state of Ubuntu on Windows:

    In Windows, where do I look? Oh, there's special API for that, the program has to be written in a special way to even qualify as a service, there's a metric fuckton of registry in addition to that.

    OMG and if you want the application to open a WINDOW you need to write it in a special way to even qualify and you have to use a "special" (SO SPECIAL GUYZZZZZZ) AND THEN THE WORLD BLOWS UP!!!!!

    Look, in .net a service is like 2 checkboxes and if you want an installer for it, that's like a right-click and "Add File -> ServiceInstaller"



  • @PleegWat said in The state of Ubuntu on Windows:

    Services in llinux are exactly like normal applications in linux, except they're not associated with a TTY.

    OK first of all: NOTHING in Linux is associated with a TTY, because what the fuck? Why would it be? I guess if the user is deaf it might be? I mean I guess if the user just happens to have a TTY plugged-in to the computer, maybe? Like if the computer's in a news room in 1976? But... huh?

    Secondly, if that's true (and I'm pretty sure it's not), that would mean it's impossible to do centralized logging with a arbitrary Linux service, which sucks and makes it FAR inferior to the Windows implementation. (Even if the WIndows implementation requires all those "special" APIs! SO SPECIAL GUYZZZZZZ!!!!!)


  • Java Dev

    @blakeyrat said in The state of Ubuntu on Windows:

    @PleegWat said in The state of Ubuntu on Windows:

    Services in llinux are exactly like normal applications in linux, except they're not associated with a TTY.

    OK first of all: NOTHING in Linux is associated with a TTY, because what the fuck? Why would it be? I guess if the user is deaf it might be? I mean I guess if the user just happens to have a TTY plugged-in to the computer, maybe? Like if the computer's in a news room in 1976? But... huh?

    A command line program (like those Microsoft is trying to implement) is connected to a TTY device. Typically this is not a hardware terminal, but a pseudo-terminal which may be displayed full-screen in non-graphical mode, displayed in a terminal emulator, or controlled over the network via SSH.

    Secondly, if that's true (and I'm pretty sure it's not), that would mean it's impossible to do centralized logging with a arbitrary Linux service, which sucks and makes it FAR inferior to the Windows implementation. (Even if the WIndows implementation requires all those "special" APIs! SO SPECIAL GUYZZZZZZ!!!!!)

    A centralized logging service like syslog is not associated with a TTY. It is started by the init system, and accepts messages from a unix domain socket or a UDP socket.



  • @PleegWat said in The state of Ubuntu on Windows:

    A command line program (like those Microsoft is trying to implement) is connected to a TTY device.

    No, it's connected to a console.

    A TTY is a teletype. Nobody fucking owns a teletype, it's 2016. Christ.



  • @PleegWat said in The state of Ubuntu on Windows:

    A centralized logging service like syslog is not associated with a TTY. It is started by the init system, and accepts messages from a unix domain socket or a UDP socket.

    Ok? Thanks?

    But that doesn't have anything at all to do with what I said since, if you are correct that a Linux service is "just a normal Linux app", there's absolutely no requirement that it implement "syslog".

    But like I said above, I think it's more likely that you're not correct.


  • Java Dev

    @blakeyrat said in The state of Ubuntu on Windows:

    No, it's connected to a console.
    A TTY is a teletype. Nobody fucking owns a teletype, it's 2016. Christ.

    You call them consoles. Linux calls them TTY devices. Which in most current cases will be terminal emulators displayed in a console window on a graphical desktop (local or remote). I don't think we're actually disagreeing here.

    @blakeyrat said in The state of Ubuntu on Windows:

    But that doesn't have anything at all to do with what I said since, if you are correct that a Linux service is "just a normal Linux app", there's absolutely no requirement that it implement "syslog".

    I think I'm not following you here.



  • @blakeyrat I guess the advantage of systemd (and predecessors) is they are more flexible and can turn many different things into services. On Windows, you need to create a special binary executable.



  • @wft said in The state of Ubuntu on Windows:

    They'd better invest in making Cygwin suck less.

    The MSys2 folks are Trying™.

    @bp_ said in The state of Ubuntu on Windows:

    I suspect most of the problems with Windows' terminal emulation actually go down to /n vs /r/n though.

    No. The console actually has its own (unicode) API and the standard output layer in Cygwin/Msys2/... uses it. So it isn't. The problem really is that the console host is utter piece of shit.

    @cheong said in The state of Ubuntu on Windows:

    Since as Michael Kaplan mentioned years ago, the Windows console does not process Unicode correctly because of compatibility problems. I'm not surprised if in the end they can't get all the LC_* environment settings work properly in console input/output.

    Windows console processes the legacy charset if you output via normal write. That's among the reasons Cygwin/Msys2/… does not and instead uses the console-specific API (another reason is to interpret the escape sequences). This accepts Unicode just fine (as UCS-2; surrogates are probably not supported).

    The main problem it has with Unicode is that it only works with some fonts and has no font substitution and the two-or-so usable fonts that Windows have by default don't cover that much of Unicode.


  • Grade A Premium Asshole

    @loopback0 said in The state of Ubuntu on Windows:

    great solutions using...Hyper-V

    Well there's your problem... This is a project by people that think that Hyper-V is a "great solution".


  • Grade A Premium Asshole

    @loopback0 said in The state of Ubuntu on Windows:

    It's not going to work perfectly.

    ls should work, if anything does.



  • @PleegWat said in The state of Ubuntu on Windows:

    You call them consoles. Linux calls them TTY devices.

    But they aren't TTY devices.



  • @PleegWat said in The state of Ubuntu on Windows:

    I think I'm not following you here.

    I'm sure you aren't, but that doesn't make my point any less valid.


  • Discourse touched me in a no-no place

    @Polygeekery said in The state of Ubuntu on Windows:

    This is a project by people that think that Hyper-V is a "great solution".

    In fairness if I was paid to say Hyper-V was a great solution, I'd say it was one too.


  • Java Dev

    @cartman82 said in The state of Ubuntu on Windows:

    @blakeyrat I guess the advantage of systemd (and predecessors) is they are more flexible and can turn many different things into services. On Windows, you need to create a special binary executable.

    Systemd starts services. It doesn't turn things into services. If you write a shell script that will loop forever and start it with nohup setsid myscript.sh &>/dev/null 0>/dev/null, congratulations, you've got yourself a service.



  • @cartman82 said in The state of Ubuntu on Windows:

    @blakeyrat I guess the advantage of systemd (and predecessors) is they are more flexible and can turn many different things into services.

    But that also means you can turn things that aren't equipped to be services (like applications that don't support remote-logging) into services. That's not a good thing.

    Services are a "special type of application" in Windows because they're required to support things that "regular" applications do not, and they're prohibited from doing some things that "regular" applications can. (Like opening windows.)

    You're telling me that in the Linux world, there's absolutely nothing preventing me from making LibreOffice Writer run as a service-- that strikes me as a HUGE error, since LibreOffice Writer would do about a billion things services aren't allowed to do, and wouldn't do a few things services are required to do.

    So instead of Linux enforcing any kind of rationality here, it's just "we trust our developers to do the right thing". But guess what? I've seen how Linux developers work. No fucking thanks.



  • @PleegWat said in The state of Ubuntu on Windows:

    Systemd starts services.

    Well duh. But how does systemd know what is and what is not prepared to be a service? How does systemd know to say "hey you can't run this as a service because it doesn't support remote logging"? Or, "hey you can't run this as a service because the first thing is does is pop up a dialog box to ask the user a question and there ain't no user"?

    I'm guessing the answer is just, "shrug! We never bothered to solve that problem because we're Linux developers and everything's shitty all the time forever!!!!!!"


  • Java Dev

    @blakeyrat said in The state of Ubuntu on Windows:

    I'm guessing the answer is just, "shrug! We never bothered to solve that problem because we're Linux developers and everything's shitty all the time forever!!!!!!"

    Pretty much that. A normal application expecting a GUI won't even start, because it's expecting to be provided a GUI in a certain way and systemd won't provide that, but it's certainly possible to install a service that works its way into the GUI to show an annoying alert box. And if you're saying that's absolutely impossible to do in windows for a determined-enough developer I won't believe you.



  • @blakeyrat said in The state of Ubuntu on Windows:

    But that also means you can turn things that aren't equipped to be services (like applications that don't support remote-logging) into services. That's not a good thing.

    Services are a "special type of application" in Windows because they're required to support things that "regular" applications do not, and they're prohibited from doing some things that "regular" applications can. (Like opening windows.)

    True.

    However, nothing's stopping you from shipping a GUI app as part of your Windows service and having the service run the app every minute, if you wanted. On the other hand, you can also make a generic "app runner" service, that is just a wrapper around any other app (like a shell script), so you can do things the linux way.

    So either way, you can do the same things on both platforms. The only difference is, Windows incentivizes you to do things correctly, while linux makes it easier to hack things together quickly.

    ...
    You call them consoles. Linux calls them TTY devices.

    But they aren't TTY devices.

    And this is a console.

    0_1460127280430_128617513.jpg


Log in to reply