Windows 10 Goes To Shell

Windows 10 — the operating system people love to hate or hate to love. Even if you’re a Linux die-hard, it is a fair bet that your workplace uses it and that you have friends and family members that need help forcing you to use Windows at least some times. If you prefer a command line — or even just find a place where you have to use the command line, you might find the classic Windows shell a bit anemic. Some of that’s the shell’s fault, but some of it is the Windows console which is — sort of — the terminal program that runs various Windows text-based programs. If you have the creator update channel on Windows 10, though, there have been some recent improvements to the console and the Linux system that will eventually trickle down to the mainstream users.

What’s New?

So what’s new? According to Microsoft, they’ve improved the call interface to make the following things work correctly (along with “many others”):

  • Core tools: apt, sed, grep, awk, top, tmux, ssh, scp, etc.
  • Shells: Bash, zsh, fish, etc.
  • Dev tools: vim, emacs, nano, git, gdb, etc.
  • Languages & platforms: Node.js & npm, Ruby & Gems, Java & Maven, Python & Pip, C/C++, C# &
  • .NET Core & Nuget, Go, Rust, Haskell, Elixir/Erlang, etc.
  • Systems & Services: sshd, Apache, lighttpd, nginx, MySQL, PostgreSQL

The changes to the console are mostly surrounding escape sequences, colors, and mouse support. The API changes included things like allowing certain non-administrative users to create symlinks. We’ve made X Windows work with Windows (using a third-party X server) and Microsoft acknowledges that it has been done. However, they still don’t support it officially.

Why, Why?

Linux follows — more or less — basic precepts set forth by the Unix operating system. While it has grown over time, Unix was built to run on computers that are not terribly different from a modern computer. True, the PDP-7 was an 18-bit computer but it didn’t have the stifling quasi-8 bit architecture that MSDOS grew up in. MSDOS, on the other hand, was battling quite a few hardware limitations. But MSDOS eventually got a shell called Windows. Then Windows turned the tables and became the operating system that could run MSDOS. But this led to a hodgepodge of issues, not the least of which is the shell was anemic. There have been several answers to this. Even back in MSDOS days, third-party shells like 4DOS were popular, not to mention Unix-like shells available with Cygwin, MKS, and similar tools. Modern Windows still has an anemic MSDOS shell, but also PowerShell and the WSL bash shell.

That different heritage has led to a pretty big disparity between the standard shell and even the simplest Linux shell. Of course, you can run Windows under virtualization on Linux or vice versa. This, however, should perform better since it is essentially reverse Wine (that is, a layer on Windows that runs Linux just as Wine is a layer on Linux that runs Windows).

Terminal Velocity

There’s also a new Windows Terminal application to manage all the shells with tabs and font support for emoji — because apparently, that’s important. You can see a flashy commercial for it in the video below.

Between having so many browser-based applications and now having a bash shell on just about everything, it is getting where you almost don’t care what CPU you are using or even what operating system. While that’s good for us, it probably isn’t good for Microsoft. Perhaps they figure they make most of their money from corporations and think this strategy will stop corporate developers from adopting open operating systems? We aren’t sure it is all that great for Linux, either, as it dilutes one of its big advantages — a wide range of tools for serious users and developers.

Just to head off the pedantic comments, we know that Linux is the kernel and the operating system is the kernel plus tools from GNU and others. But colloquially, people say Linux and so do we. While Linux is “free” — if you are supporting it and your time has any value, that’s not totally true. You can pay someone like Red Hat for your support, but then having Microsoft support is one of Windows selling points — most of the time.

If you are not running Windows 10, want painless X Windows, or just don’t want to use the Microsoft tools, there’s always Swan which is based on Cygwin. As for me? My main operating system is Emacs. Don’t tell Elliot.

51 thoughts on “Windows 10 Goes To Shell

  1. It is a step in the slow walk of MS moving towards caring what scripters do and letting them get things done. a few years ago when they were rolling out powershell, they put out an ask to come watch early adopters use the shell. It looked a lot like they really wanted to see our processes and make it so the tool worked more closely to the way we do.

    At work, I am stuck in the MS ecosystem. I appreciate the functionality of the new tools, and it will be nice to run into functionality instead of errors when I log in from home and accidentally type ls instead of dir. We will never really get everything we need everywhere we need it as long as we hop between OSes as often as we eat food.

    I appreciate the gesture.

  2. I find the color support interesting. Things that ran correctly in old ansi.sys got too slow to use after the xp era, so I´ve removed most of it from the scripts we use here. But color makes some things much easiter to explain to other people who will use a script.

    It would be nicer, also, if one could download an alias file to reproduce the command-line commands and switches ( dir, copy, move, ren, etc ) from windows in linux.

    1. Don’t rely too much on colors, and if you do use few and clearly contrasting ones.
      Especially today, people abuse the amount of colors there exist, making it hard for people with differing color vision to distinguish some colors.
      Please keep it simple and clear.

      Those color people already made many things much harder than they were when systems were more restricted.

    1. Cleverly, Hackaday has a preference to remove angle-bracketed tags such as and , the comment should have read: Please tell me they’ve finally removed the preference for in Windows text files. We really don’t need compatibility with the AD1901 Murray-Baudot code any more ;-)

      1. Even more cleverly, Hackaday has a preference to remove angle-bracketed tags even if they have spaces after the brackets. This time, I’ll use square brackets (imagine they’re angled). The comment should have read:

        Please tell me they’ve finally removed the preference for [cr][lf] in Windows text files. We really don’t need compatibility with the AD1901 Murray-Baudot code any more ;-)

        Thank you Akismet.

        1. Agreed, double-character line-endings just have not make any sense for a few decades now. The technology that needed it didn’t survive a fraction as long as the extra char.

          Maybe “/r/n” would have made the point.

  3. Oh, so I can pull out my old copy of TheDraw and start doing ANSI art again? Ah, the good old days of the Napalm Enema BBS…. when times were simpler and those new-fangled “WWW’s” took half an hour to load through CompuServe’s Internet gateway.

        1. I once became the owner of a $30,000(?) optical lens grinder because it had a PC inside running a DOS program that would occasionally would write an error log. One log per error. To the root directory. Once it hit the file limit, the machine itself stopped working. (I corrected the source of the problem, but they had already started using a newer, better one, so let me keep it.)

    1. DOS and Windows have natively supported using slashes and backslashes both throughout from the beginning. You can mix and match them, too. DOS and Windows do not care.

      If you find an application that doesn’t let you use regular slashes, that’s the fault of the application, not Windows.

  4. I wonder how and why ‘apt’ is there. If I install a piece of software via apt from which repos is it downloaded and where exactly is it installed? C:/Program Files/ ? or somewhere else?

    Glad to see that those who are stuck on Windows for whatever reason (work, family members, gaming) will at least get a decent command line terminal/shell…but in most cases, if they’re tech-capable they’ll either:
    – Install Linux on a VM or
    – Remove Windows completely and install Linux natively or
    – After installing Linux natively, they run a Windows VM for access to MSWord and Outlook,.

    At home, I moved exclusively to Linux 8 Years ago and have yet to look back. Work provides with a Windows computer that I haven’t used in years. Instead I have a refurbished budget computer that I bought with my own money running Linux. I access work’s MS Windows system via remote login (VDI) when I absolutely need it for using MS Word, getting access to intranet files or network printing

    1. A very quick search on Google will get you your answers.

      In fact, everything mentioned in this article has been available openly in Windows releases for 1-2 years.

      Why this is appearing on Hackaday NOW is a mystery to me.

  5. Why use a command window that’s trying really, really weakly to be a Unix shell, when you can install MinGW and get a full GNU development environment in Windows? This has been around for many years.

  6. “and now having a bash shell on just about everything, it is getting where you almost don’t care what CPU you are using or even what operating system. While that’s good for us, it probably isn’t good for Microsoft.”

    Not nessecarily true. If they didn’t add bash alternatives to windows, then people would more likely use another OS. Now, there’s at least a chance they won’t immediately move to another one and just stay on windows.

    Or it might help developers switch to windows so they can test other windows related issues, while still having a sane dev environment.

  7. “font support for emoji — because apparently, that’s important.”

    It is if you’re writing software that needs to validate that user input of emoji behaves as expected.

  8. “and that you have friends and family members that need help forcing you to use Windows at least some times”

    Nope, I dont help family with their computers any more. They are all on their own now and if they have problems i tell them to learn or just get a tablet like everyone else.

    I will teach them how to use my gear if they have a need for it but fixing their problems is out of my realm and quite frankly usually only a google search away for them.

    The reason that we have so many security issues is because people refuse to learn about how computers work, Because they dont know how they work they dont care about security and if they dont care about security then the corporations wont sell them security.

    At some point in time you have to let go of a babies hand and let them learn to walk on their own.

  9. As for why Microsoft is adding ‘Linux’ into Windows, it is for the same reason they are adding virtualization support into Windows for Linux; If you run Windows under Linux, you need Windows (thus, Microsoft gets profit, control). And why would people want it? Well ‘out of the box’, Windows does A, Linux does B, soon Windows will do A and B, so developers, etc will have the best of both worlds, and Microsoft gets paid.
    The only possible fail is if developers write for Linux…

  10. How am I the only one who noticed that the “recent upgrades” article linked to was written in *2017*?

    I came here hoping there was an upgrade/fix for networking services like ping or netcat. ;-)

    That said, I use Bash on Ubuntu on windows everyday and love it, was just hoping they had finally gotten the network stack fixed and I was hearing about it here first… instead, I’m two or more years ahead of this articles’ curve.

Leave a Reply to Tom Mobley Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.