Most active commenters

    ←back to thread

    Ubuntu on Windows

    (blog.dustinkirkland.com)
    2049 points bpierre | 18 comments | | HN request time: 0.619s | source | bottom
    1. xaduha ◴[] No.11390950[source]
    > Windows 10 users

    > Can open the Windows Start menu

    > And type "bash" [enter]

    > Which opens a cmd.exe console

    Right... Bash is a shell, but your interaction with it is controlled by a terminal program. Unless there are some real changes to cmd.exe t̶h̶e̶n̶ ̶i̶t̶'̶s̶ ̶n̶o̶t̶ ̶t̶h̶a̶t̶ ̶i̶m̶p̶r̶e̶s̶s̶i̶v̶e̶ . You can compile a native bash and other utils now yourself, it's not that hard.

    EDIT: It's more like a Linuxulator from BSD, which is certainly cool.

    replies(5): >>11390968 #>>11390991 #>>11391035 #>>11391091 #>>11391196 #
    2. tlrobinson ◴[] No.11390968[source]
    > "Hum, well it's like cygwin perhaps?" Nope! Cygwin includes open source utilities are recompiled from source to run natively in Windows. Here, we're talking about bit-for-bit, checksum-for-checksum Ubuntu ELF binaries running directly in Windows.
    replies(1): >>11391009 #
    3. AlexeyBrin ◴[] No.11390991[source]
    You seem to completely miss the point of what they did. It is not a simple Bash recompilation for Windows. It is a way to run Linux (Ubuntu) binaries on Windows.
    replies(3): >>11391133 #>>11391155 #>>11391172 #
    4. seren ◴[] No.11391009[source]
    If you write a command line utility, just putting in ubuntu repo makes it available to all windows user, without even recompiling.
    5. to3m ◴[] No.11391035[source]
    "cmd.exe console" means (presumably...) a standard Windows console subsystem window. This is independent of cmd.exe, but it's common to conflate the two. Unix users often get this mixed up, presumably because they don't believe Windows has any kind of layering or modularity ;)
    6. dec0dedab0de ◴[] No.11391091[source]
    If you just need bash on windows installing Git is the easiest way.
    replies(1): >>11392034 #
    7. xaduha ◴[] No.11391133[source]
    My point is that you need a terminal program (like putty or iTerm2 on OS X for example) to get all the benefits.
    replies(1): >>11391178 #
    8. TheRealDunkirk ◴[] No.11391155[source]
    Well I, for one, think he has a point. Part of what makes the shell so useful on Linux is, say, highlight-to-select. When the CMD.EXE doesn't understand line breaks in copied text, it's substantially crippled. You need a proper terminal to take advantage of a proper shell. They go hand-in-hand.
    replies(2): >>11391355 #>>11391706 #
    9. zxcvcxz ◴[] No.11391172[source]
    It doesn't sound much different than a built in VM with a some optimizations. Just more bloat for windows I suppose.
    10. tlrobinson ◴[] No.11391178{3}[source]
    He says it mostly works in cmd.exe, and they're working on getting things like screen/tmux working too.

    If a fully-compatible terminal emulator doesn't exist yet (I have no idea) I bet there will be one within a year.

    replies(1): >>11391583 #
    11. mmebane ◴[] No.11391196[source]
    > Unless there are some real changes to cmd.exe then it's not that impressive.

    There actually have been [1], and I imagine MS has continued to flesh out those improvements.

    [1]: https://news.ycombinator.com/item?id=11046433

    12. Guvante ◴[] No.11391355{3}[source]
    Nothing about what they implemented prevents you from using a different terminal.

    Also cmd.exe on Windows 10 does support line breaks in copied text from what my minor test just showed.

    13. quotemstr ◴[] No.11391583{4}[source]
    conhost (the black box that typically runs cmd.exe) is a terribly shitty terminal emulator. My biggest gripe with Windows has been the lack of a decent pseudoconsome system that would allow an ecosystem of terminal emulators to developer, as one has for POSIX-ish systems.
    replies(2): >>11393788 #>>11415843 #
    14. alkonaut ◴[] No.11391706{3}[source]
    Selection, copying, wrapping etc. has been fixed in the Win10 version of the console host.

    In pervious versions you could always use another console like Console2, but now it's built in (although the third party options still have more features than the new built in one).

    15. dagw ◴[] No.11392034[source]
    It's not about bash on windows, it's about any Linux command line tool on windows (in bash).
    16. ZenoArrow ◴[] No.11393788{5}[source]
    What about ConEmu? Works well for me, I especially like the Quake-style dropdown terminal option...

    https://github.com/Maximus5/ConEmu

    replies(1): >>11394082 #
    17. quotemstr ◴[] No.11394082{6}[source]
    ConEmu looks nice; it came out after I switched from Windows to Linux, so I've never tried it. I like the idea of hooking the console API functions; before I stopped using Windows, I was working independently on a similar API-hooking system that talked to the Cygwin pty layer instead of to a custom terminal.

    With a real pty, you'd be able to use any Windows console program with mintty, sshd, Emacs term-mode, or whatever else you wanted, transparently. I regret not having a chance to finish that work.

    18. JdeBP ◴[] No.11415843{5}[source]
    > My biggest gripe with Windows has been the lack of a decent pseudoconsome system that would allow an ecosystem of terminal emulators to developer, as one has for POSIX-ish systems.

    This has been up since the turn of the century:

    * http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/ca...

    The demonstrators in the Microsoft video do warn that they will be avoiding some of the holes of the system in their demonstration. One is very briefly visible at 08'13", before the demonstrator rapidly clears the screen (again), when they run apt-get to install git:

      E: Can not write log (Is /dev/pts mounted?) - openpty (2: No such file or directory)
    
    The new Windows NT Linux subsystem apparently doesn't have pseudo-terminals.

    The old Windows NT POSIX subsystem (the Interix-derived SFU/SFUA one) has pseudo-terminals with both BSD and System 5 access semantics, in comparison.

    * https://technet.microsoft.com/en-gb/library/bb497016.aspx

    * https://technet.microsoft.com/en-gb/library/bb463219.aspx

    Moreover, a Windows console window that is the controlling TTY of a POSIX program in that subsystem has the POSIX cooked input mode with local echo, and generates escape sequences for extended keys.