s an operating system, Linux offers impressive stability, amazing open-source support and an incredible array of powerful administration tools. While Windows 10 is able to offer support for some of these things, there’s nothing quite like using a bash shell to manage your local and network machines. Until fairly recently, running bash on Windows has required Cygwin or the equivalent.
How To Install The Linux Subsystem For Windows
In recent versions of Windows 10, Microsoft has allowed users to install a beta version of a bash shell via Ubuntu. With the Fall Creators Update (Update 1709), users are now able to install the Windows Subsystem for Linux (WSL). With WSL, you can run powerful shell commands through a real bash shell, manage multiple distros, and even install Linux command line packages and applications with apt-get.
What Is the Windows Subsystem for Linux?
The Windows Subsystem for Linux is a stripped-down version of Linux that runs within Windows 10. The language Microsoft uses to describe the feature can be somewhat confusing, making it sound like you’re installing an additional operating system alongside your Windows 10 installation. While you are installing pieces of a full Linux distribution, you’re not getting the desktop environment or window manager that we often associate with desktop Linux. You won’t overwrite Windows 10 files, nor do you need to dual-boot your system.
Don’t be disappointed, however. Instead of getting a GUI, you’re getting the most powerful and useful part of Linux: the command line interface. With this tool you can take control of the deep functionality of your system, using bash commands and command-line applications from Linux.
You may have previously heard this referred to as “Bash on Ubuntu on Windows.” That was the beginnings of WSL, and it was in beta on Windows 10 for about a year. With the full release of WSL in the Fall Creators Update, Bash on Ubuntu on Windows is now deprecated and will no longer receive updates from Microsoft or Canonical. If you had that beta installed, installing the Windows Subsystem for Linux may overwrite your existing Bash on Ubuntu files.
Enabling the Windows Subsystem for Linux in the Windows 10 Fall Creators Update and Later
The full version of the Windows Subsystem for Linux is only available for the Fall Creators Update (1709, build 16215 and later). With that version of Windows, you can actually install the Windows Subsystem for Linux from the Windows Store. You just need to do some preparation in PowerShell.
Step 1: Turn on the subsystem in PowerShell
1. Search for “PowerShell” in the Start Menu.
2. Right-click on the PowerShell icon and choose “Run as Administrator.”
3. Copy the following command and paste it to the PowerShell command line by right-clicking. Then press the Enter key.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
4. Press Y, then Enter to restart your computer when prompted. Your PC will restart instantly, so be sure to save any work beforehand.
Step 2: Install your Linux distro from the Windows Store
1. Navigate to the Windows Store and click on the distro of Linux you want to install. As of this writing, three distros of Linux are available for installation, including Ubuntu.
2. Click the “Get” button to download the distro.
Step 3: Launch and Run the Distro
1. In the Windows Store, click Launch to run the newly-installed application. You can also find the distro by typing its name (in this case, Ubuntu) in to the Start Menu, just like any other application.
2. Once the window opens, wait for the installation process to finish.
3. Create your UNIX username and password. This can be different from or the same as your current Windows username and password and has no relationship to your existing username and password.
Mission accomplished! You now have the Windows Linux Subsystem installed, providing a bash shell on your Windows 10 machine. From here you can use bash commands, run shell scripts, and install additional utilities with apt-get. It’s a fully-featured shell, so the limits are about what you’d expect from an actual Linux installation.