Software Development

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.

  1. Verify that Windows 10 installation is 64-bit “system type” and has an “OS Build” of at least 14393.0.20161119-windows10-settings-system-about
  2. Turn on “Developer Mode20161119-windows10-settings-updatesecurity-fordevelopers-developermode
  3. Enable Windows Subsystem for Linux (WSL) [“Turn Windows Features On or Off” GUI]
  4. Enable Windows Subsystem for Linux (WSL) [PowerShell Command-line]20161121-enablingwindowssubsystemlinuxinpowershell
  5. Restart Computer as Directed
  6. Run bash from Command Prompt (Downloads Canonical’s Ubuntu on Windows)20161121-downloadingcanonicalubuntuonwindows
  7. Create a Unix User20161121-windowsbashcreateusername

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.

20161122-usingbashonwindows10

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.
Subscribe
Notify of
guest

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

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Riccardo Cossu
7 years ago

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 »

Back to top button