Since Microsoft started planning and building Windows 10, they’ve been talking to a lot of users about what users would like to see in Windows to make it a great place for users to build awesome apps, sites and services for all platforms and all devices. Many users told Microsoft that working with open-source tools on Windows is often a struggle and that users would like Microsoft to make it easier to use these tools on Windows. So it seems that finally Microsoft is bringing bash on Windows 10!
Based on users feedback Microsoft has done a couple things:
- First Microsoft made investments that improve cmd, PowerShell, and many other command-line tools and developer scenarios.
- Second Microsoft decided to grow our command line family by adding real, native Bash and with it support for Linux command-line tools which run directly on Windows in an environment that behaves like Linux!
To accomplish this, Microsoft built new infrastructure within Windows – the Windows Subsystem for Linux (WSL) – upon which Microsoft run a genuine Ubuntu user-mode image provided by our great partners over at Canonical, creators of Ubuntu Linux.
In our journey to bring free software to the widest possible audience, this is not a moment Microsoft could have predicted. Nevertheless, Microsoft are delighted to stand behind Ubuntu for Windows, committed to addressing the needs of Windows developers exploring Linux in this amazing new way, and are excited at the possibilities heralded by this unexpected turn of events.”
— Mark Shuttleworth, founder of Canonical
The result is that users can now run native Bash on Ubuntu on Windows!
You can now run Bash scripts, Linux command-line tools like sed, awk, grep, and users can even try Linux-first tools like Ruby, Git, Python, etc. directly on Windows. You can also access your Windows filesystem from within Bash allowing users to work on the same set of files using your preferred Windows tools or Linux command-line tools:
Caveat Emptor (Buyer Beware!)
While we’re excited for users to try out this new technology, which will first become available in Windows 10 “Insiders” builds after the Build conference, Microsoft want to be clear about a few things:
- First, this is the first time we’re releasing this technology – it’s marked as beta for a reason: We know that there are some rough edges and that some things will break! Do not expect every Bash script and tool that users run will work perfectly – there will be gaps. But by trying out this feature, you’ll help us figure out what Microsoft need to work on in order to greatly improve our reliability, coverage, and reach.
- 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 users write and build all your code for all your scenarios and platforms. This is not a server platform upon which users will host websites, run server infrastructure, etc. For running production workloads on Ubuntu, Microsoft have some great solutions using Azure, Hyper-V, and Docker, and Microsoft 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 users won’t be able to run Notepad from Bash, or run Ruby in Bash from PowerShell.
But wait, there’s more!
Existing command-line tools are now greatly improved thanks to investments made in the Windows Console. Microsoft has significantly improved rendering performance, added support for more VT-100 sequences, and how it handles complex text layout. Microsoft has also made some key improvements in how the Console handles High-DPI screens.
These improvements directly benefit cmd prompt, PowerShell, new tools like Bash, the new Windows Docker client, and many other existing Microsoft and 3rdparty command-line tools.
Related Build 2016 Content
If you’d like to learn more, you can watch Kevin Gallo’s keynote announcement and demo of running Bash on Ubuntu on Windows at Build 2016.
Also, Rich Turner and Russ Alexander recorded a Build 2016 session introducing and demonstrating Bash running on Ubuntu on Windows.
Microsoft is looking forward to working with users to improve the Windows command-line tools and console:
Please continue to suggest features etc. via their Windows Command-line UserVoice portal and stay tuned for lots more news on Microsoft’s new command-line blog and command-line documentation portal for content and links to resources.
It’s a trap!