Improvements to Bash on Windows and the Windows Console

Download this episode

Download Video

Download captions

Download Captions

Description

Bash on Ubuntu on Windows and a much improved Windows Console shipped as part of Windows 10 Anniversary Update. In this video, Rich Turner will review what has already been delivered and what's coming for Bash on Windows and the Windows Console in Windows 10 Creator's Update.

Learn more about all things command-line here: https://blogs.msdn.microsoft.com/commandline/

For more information, check out this course on Microsoft Virtual Academy:

Tags:

Windows, Linux, Bash

Day:

0

Session Type:

On-demand

Code:

191

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      Chris

      The irony here is that my experience with Windows 10 is what finally drove me to switch to Linux full time on my personal laptop.

    • User profile image
      anon

      Please use bash on Linux or FreeBSD.

    • User profile image
      Gabriele

      Rich Turner: you should push for a "Developer edition" of Windows 10 that treats our workstations as what they are (e.g. not as "devices" with "apps"). We are professional trying to do work, not consumers looking at cat pictures.

      I have been doing most of my development on Windows and deploying on Linux for more than 16 years now. Windows 10 is the first version where I feel out of place doing development. I do not even have control of software updates!

      My laptop is currently Windows 7. When this dies, and I have two buy a new one, I am probably going to do like Chris: switch to Linux instead of using Windows 10...

    • User profile image
      DaPorkchop

      Let windows be windows, and Linux be Linux. Just because you microsoft people love windows, doesn't mean that everybody should switch to windows. Windows 10 is designed for people to google stuff on a gaming pc (my SSD RAID 10 struggles to boot up windows 10 in under 2 mins), Linux is designed for programmers. PowerShell is nothing, and there is never EVER going to be any sort of real alternative to bash on windows. You guys were all "go linux" until it started to take up a larger % of the market share. 

    • User profile image
      Anon

      Okay, I'm ready to try, but I have a few things that need to happen before I do that from Microsoft side:

      1. Stop patent trolling everyone with your stupid filesystem etc. patents (I prefer, if you close your whole patent division).
      2. Release Office as Open Source (no explanation needed).
      3. Open up your identity platform so that everyone can expand it in distributed fashion.

      Well, I know you will not do any of those things. You have not changed. You just pretend that you have. You still use same tactics. The difference now is that you want to have slice of Open Source cake and eat it too. Get up with your act, and show us something real, that we can at some level trust you. Now we can't.

    • User profile image
      Stephane

      Do not trust Microsoft.
      If they really liked Linux, their windows updates would not destroys our boot loader at each update (in dual-boot configuration).
      Sorry Microsoft, you are light-years behind Linux.

    • User profile image
      Alejandro


      Bash on windows 10 mobile if that succeeds, the story will change

    • User profile image
      JaviAl

      Some things because i never, never use Windows 10:

      - Until completely removed ALL TELEMETRY i will never use Windows 10.

      - Until completely removed ALL ADS (recommendations, suggestions) i will never use Windows 10.

      - Until I control updates like Windows 7 i will never use Windows 10.

      - I do not need an OS that constantly requieres a Microsoft Account. I will never create one.

      - The User Interface is ugly, very, very ugly. Flat and plain. No skeumorphic, 3D, desgrades, no lack of contrast between areas, limited and ugly color selections, ugly icons with only one color that more than icons are hieroglyphic. Its a mobile user interface on a desktop computer that have no sense. I prefer Aero Glass. At least like an option.

      - The Start Menu is designed ONLY to show ADS in Live Tiles. I do not like Live Tiles and i want to remove it at all. I can't order and catalog All Programs. I can't create shorcuts on Start Menu or simply drag & drog items between Start Menu and the desktop like in Windows 7. The Start Menu, like all the Windows 10 OS is very, very limited.

      - A desktop OS not need limited mobile apps. All UWP apps are limited, slow, ugly like Photos, Mail, etc. Any Windows Live applications (developed more than 8 years ago) are more powerfull, with more features and more speed. Also Windows Mail & News in Windows 3.1 is more powerfull than any mail app on Windows 10. I also prefer all default viewers and applications in Windows 7. Until Microsoft add an option to optional install all UWP garbage, including Windows Store, i will never use Windows 10.

      - Windows 10 is very limited, i can't unistall Onedrive or any other UWP garbage app. I can't configure the desktop Advanced Appearance Settings, the Shadow Copies, Network has less options than Windows 7. I can't select a customized color for my desktop, only ugly colors for a Microsoft palette of colors. All options moved from the Control Panel to the very ugly Configurations settings has less options.

      - Windows 10 is a mobile OS that only compete with other mobiles OS's like Android or iOS. Not compete with desktop OS's like Linux, Mac OS X, Windows 7, etc. I do not need a mobile OS on my desktop.

      - I need a desktop OS that the user has the total control of the OS, not like Windows 10 that Microsoft has the total control of the OS and the user can't do nothing. On every update Microsoft change all user settings and preferences. I don't need an OS that is constantly disturbing my job with notifications about how bad Chrome and Firefox is, and how good Microsoft and Office 365 is. Doing this kind of things are resons for me for never use a Microsoft Browser or subscribe to Office 365. Also with the anti gmail campaign from Microsoft i migrate all my hotmail accounts (that recieves all my important emails to the spam folder) to Gmail (runs best).

      I know that the new Microsoft is Mobile First, Cloud First, Telemetry First, Ads First, and desktop never again.

    • User profile image
      Vinicius

      This is great work and a great technical achievement. As a Windows and Linux developer, I simply love it. I can finally compile firmwares directly from Visual Studio, without using a Linux VM and/or other hacks. I feel free to love both of them: Linux and Windows.

    • User profile image
      ThePhoenyx

      If you really mean what you are saying, figure out a way for my InfNoise usb Trng to talk to WSL. I've tried and all I get is Device not found, while I run the Windows version of the software (without moving the usb or even rebooting) and lo and behold, it works great.

      N.B. The InfNoise is a hardware true random number generator, available on Tindie.

    • User profile image
      BoWeaver

      Thank you Rich I needed a good laugh today.

      You said "they’d do it on Linux, all without losing the advantages of Windows 10."

      Really seriously what advantages does Win10 have? None that I can see everything I need to do for work happens just fine on a Linux box.

      The advantages I can see with just Linux is no pervert is copying my private data to some known server. With Linux I can see every byte of data and where it is going. I have control over my system not the other way around.

      You talk about running Apache on Windows but if Apache gets breached then I have SYSTEM level access unlike a Linux machine where Apache runs under a normal user account. It's a nice touch with Apache on Windows that if I can get remote command injection all I have to do is inject "net user hax0r "0hurscrewed!" /add" then "net localgroup "Administrators" hax0r /add". This can't happen with Apache on Linux.

      Yep really great OS you got there. No thank you I'll stick to Linux no Peeping Tom's no ads just a good stable secure OS.

    • User profile image
      BitCrazed

      @ThePhoenyx: We don't yet support USB devices, but the ask is on our UserVoice (https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/16759696-support-usb-devices-like-microcontrollers-libusb) where we ask the community to upvote asks for future/missing features which helps us prioritize what features we work on next.

    • User profile image
      BitCrazed

      @BoWeaver: MANY Windows users find significant benefits to running Windows, including:

      • The ability to run the full Office suite
      • Ability to run the many, MANY LOB applications that many companies have built and use to operate their businesses
      • Broad and solid support for a colossal range of available hardware, peripherals, machines, processors, GPU's, etc.
      • HUGE range of games and entertainment titles that are built to run on Windows
      • etc.

      While I fully appreciate that Windows may not satisfy your requirements / needs, understand that Windows does satisfy the needs of many hundreds of millions of people every day.

      Many of the people I, and many individuals and teams around Microsoft interact with daily find Windows to be a productive, powerful, flexible platform and environment in which to get their work done.

      However, prior to the release of Bash/WSL, many developers directly asked us to better support *NIX tools on Windows, for example: https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/6509630--windows-as-a-unix-or-porting-of-popular-unix

      We carefully examined this and many other requests posted to our UserVoice page and decided that just delivering a few of the GNU/*NIX tools wasn't enough - instead, we decided to deliver a genuine Linux-compatible kernel subsystem which could run many, then many more, and one day most *NIX command-line dev tools, to enable developers build and run the tools they need to get their work done.

      We're part-way through the process of creating this infrastructure and can already run a great many of the *NIX tools that many developers tell us they need/want. We have more work ahead of us yet before we can support USB devices, mounting of external/networked storage devices, CUDA/GPU support, etc. that many developers are asking us for, but we'll do our best to prioritize this work appropriately.

    • User profile image
      Juliano

      Windows is:
      - Paid, include his tools as office and most of softwares
      - As a person with HIV, is a terminally ill patient who needs constant protection,
      - is a constant threat to its users (espionage, security)
      - leaves your users more and more disappointed

      Linux is:
      - Free, and with a great variety of distribuitions
      - It has all the tools that windows have (and more), FREE
      - is not sick and does not threaten its users
      - is much more customizable, beautiful, lightweight
      - leaves your users more and more in love

      Microsoft: was born and continues being a dishonest company (until it turn its products opensource, removes all patent lawsuits, stops thinking that it deceives people, among many other things).

      In the end, I have the pleasure of watching the game turning, microsoft is sinking more and more. And I've been repeating this to as many people as possible.

      Long live the free world from harassment of those who just want to take advantage over people.

      Juliano

    • User profile image
      BitCrazed

      @Gabriele: We hear you, esp. regarding updates - know that we're on it and that improvements to the update mechanism and UI are on their way and will show up in Win10 Insiders builds first, before being delivered in Win10 Creator Update due spring 2017.

      Also note that we're keen to strike a decent balance between providing you THE most productive environment in which to get all your work done, and running a business.

      Do PLEASE be sure to share your feedback via the Feedback Hub - it gets routed directly to the teams responsible for each of the features in Windows and is your best way to effect change.

       

    • User profile image
      PhMajerus

      Adding support for RGB colors to the Windows console is great, even for Win32 console apps.
      However, you currently have an ANSI parsing bug that prevent taking fully advantage of it.

      If an ANSI sequence defines the foreground color using RGB components, and sets the background color as transparent (reset/default) in the same sequence, the foreground color is set to white instead of the specified RGB color.

      This can be tested from Bash using the following, all 3 commands should display "Test" in light blue.
      echo -e "\E[38;2;64;128;255mTest\E[m"
      echo -e "\E[38;2;64;128;255;49mTest\E[m"
      echo -e "\E[49;38;2;64;128;255mTest\E[m"
      It works fine in a Ubuntu on Linux with gnome-terminal, but fails (2nd shows gray instead of blue) in Ubuntu on Windows with conhost.exe.

      More details and upvote in Feedback Hub at https://aka.ms/G4j2ax

    • User profile image
      MikeH

      Cannot trust a company or organization that does not itemize update changes. Linux / open source allows viewing of all bug fixes in said update but Microsoft Updates only summarize as "Fixed stability" or tries to keep it obscure as possible and trying to sneak useless items in, such as telemetry intrusion, into the system. Goodhart's Law; once you measure something, it changes. One should only enable telemetry / tracing if and when it is needed to find an underline issue.

      I have no trust in Microsoft and will no longer bare-metal load the OS if it is needed to perform some task that WINE cannot do. Even all cross-platform programming is done on Linux, while Windows or Mac OS X is just used to compile for their platform OS.

      BASH has been on Windows for years, Cygwin, and yet strange Linux is more effective development and troubleshooting wise because it allows for using console, SSH, base analytical tools. gdb works in scenarios where Visual Studios Debugger cannot, since it is console and or GUI while not requiring a back-end service to tie remote debugging with debugger. gdb is not just for desktop or server debugging but also for embedded debugging.

      A person has full control over their Linux while Microsoft deems what one can or cannot do or one can or cannot disable with Windows. Why run an OS that requires useless features to always be running? How does one strip away Windows to run in just 16 MB RAM, can't but Linux and BSD can! Both can go from Desktop to Server to Embedded, something Windows cannot do.

    • User profile image
      BitCrazed

      @MikeH: Thanks for sharing your thoughts.

      Cannot trust a company or organization that does not itemize update changes.

      Mike: Glad that we agree on this point at least: https://msdn.microsoft.com/en-us/commandline/wsl/release_notes

      Linux / open source allows viewing of all bug fixes in said update but Microsoft Updates only summarize as "Fixed stability" or tries to keep it obscure as possible and trying to sneak useless items in, such as telemetry intrusion, into the system. Goodhart's Law; once you measure something, it changes. One should only enable telemetry / tracing if and when it is needed to find an underline issue.

      While I hear ya, understand that Windows is a vast, VAST product and detailed feature changes across every aspect of the OS would not only run to hundreds of pages per release, and with releases coming weekly, quickly grow into an unmanageable mountain of data, but it's also interest a relatively small audience.

      We do hear you though and I know that more teams are starting to publish increasginly detailed release notes for their areas/features, as, for example, we, the WSL team do.

      I have no trust in Microsoft and will no longer bare-metal load the OS if it is needed to perform some task that WINE cannot do. Even all cross-platform programming is done on Linux, while Windows or Mac OS X is just used to compile for their platform OS.

      Sorry to hear that, but glad that you have somewhere to be happy and productive. Each unto their own.

      BASH has been on Windows for years, Cygwin, and yet strange Linux is more effective development and troubleshooting wise because it allows for using console, SSH, base analytical tools. gdb works in scenarios where Visual Studios Debugger cannot, since it is console and or GUI while not requiring a back-end service to tie remote debugging with debugger. gdb is not just for desktop or server debugging but also for embedded debugging.

      I don't think you quite understand what Bash/WSL is: It's not a Win32 port of some of the GNU tools (which msys/Cygwin are), and its not a bash shell, ironically; it's a distro agnostic implementation of the Linux kernel ABI & syscalls, enabling unmodified Linux ELF64 binaries to run natively on Windows. Canonical provide an Ubuntu userland distro and you can clone & build and/or download/apt packages you need to get your stuff done.

      A person has full control over their Linux while Microsoft deems what one can or cannot do or one can or cannot disable with Windows. Why run an OS that requires useless features to always be running? How does one strip away Windows to run in just 16 MB RAM, can't but Linux and BSD can! Both can go from Desktop to Server to Embedded, something Windows cannot do.

      FWIW, Windows can, and has been stripped back to run on IoT devices, Raspberry Pi's, ATM's, PoS devices, phones & tablets, desktops/laptops, nano-servers, containers, servers and clouds 

      While Windows may not suit your needs, it satisfies the needs of a very large number of end-users, businesses, and developers. 

      As I said above, each unto their own.

    • User profile image
      joe

      Haters are gonna hate (to the linux fans). I've been using Windows since 3.1, 95, 98, NT, XP, etc etc... and am happy with Windows 10 (despite banging my head against the wall sometimes). I have also used Linux on an off, and was surprised with Ubuntu's default file manager, you cannot see the timestamp a file was modified to the second (or was it millisecond). This has been available in Win 3.1 since 199x! I know.. get another File Manager but why should i bother, isn't Ubuntu supposed to be the latest and greatest...

    • User profile image
      harry

      does this mean I can use powerline?

    • User profile image
      anon

      Joe is a genius! My idol!

    Add Your 2 Cents