Bash on Windows 10
Because I work with Linux and Windows based machines for development, I often find myself wishing that I had some of the handy command-line Linux tools available in my Windows environments. Cygwin, PowerShell, and custom Groovy scripts written to emulate Linux tools have helped, but I was pleasantly surprised to recently learn that Bash on Ubuntu on Windows 10 is available. In this post, I briefly summarize some of the steps to make bash available on Windows. More detailed instructions with helpful screen snapshots can be found in the Installation Guide.
The Windows Subsystem for Linux (WSL) is described in the Frequently Asked Questions page as “a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.” This same FAQ page states that enabling WSL “downloads a genuine Ubuntu user-mode image, created by Canonical.”
The following are the high-level steps for getting Windows 10 ready to use WSL bash.
- Verify that Windows 10 installation is 64-bit “system type” and has an “OS Build” of at least 14393.0.
- Turn on “Developer Mode“
- Enable Windows Subsystem for Linux (WSL) [“Turn Windows Features On or Off” GUI]
- Enable Windows Subsystem for Linux (WSL) [PowerShell Command-line]
- Restart Computer as Directed
- Run
bash
from Command Prompt (Downloads Canonical’s Ubuntu on Windows) - Create a Unix User
Once the steps described above have been executed, bash
can be easily used in the Windows 10 environment. A few basic commands are shown in the next screen snapshot. It shows running bash
in the Command Prompt and running a few common Linux commands while in that bash shell.
As a developer who uses both Windows and Linux, having bash available in Windows 10 is a welcome addition.
Reference: | Bash on Windows 10 from our JCG partner Dustin Marx at the Inspired by Actual Events blog. |
I am a long time Linux and Mac user (I haven’t seriously used Windows on work since 2007), so I was so happy about Ubuntu on Windows, that I bought a Windows computer to try it out; leaving aside the cumbersome procedure to get to the right build number, I was very disappointed with the result. That shell is less integrated in the Windows system than a virtual machine would be, and to some point even less useful than an actual remote shell on a linux server on a “native” bash (either on Mac or Linux). For one, there is… Read more »