Windows Subsystem for Linux
The Windows Subsystem for Linux (WSL) is nifty feature in Windows 10 that let’s us run Linux binaries inside of our Windows environment. WSL was first released as stable with the Windows 10 Fall Creators Update so you’ll want to make sure you’re running at least that version of Windows 10 or newer to take full advantage of it.
WSL currently supports Ubuntu, openSUSE, and SLES distributions with support for more in the pipeline. These distributions are currently available in the Windows Store app. If you’re already signed in with your Microsoft account, then it’s just a quick and easy install. But what if you can’t or don’t want to use the Windows Store?
If you’re like me and prefer using Windows 10 with a local account only, the good news is that we’re not out of luck. There exists a method for installing a WSL distro without having to go through the Windows Store. WSL is an especially useful feature for sysadmins that work with Windows Server and since Windows Server 2012 doesn’t include the Windows Store (as it shouldn’t), Microsoft has provided the ability to side load a WSL distro in for server environments. As it turns out, the WSL server install method also works for regular Windows 10 systems as well. Let’s walk through the process of installing Ubuntu 16.04 with WSL.
1. Enable WSL
Before we can install Ubuntu, we first need to enable WSL within Windows 10.
- Open the Start Menu and type Turn Windows features on or off then press Enter.
In the Windows Features list, find and check the box next to Windows Subsystem for Linux then click OK.
You’ll be asked to restart you computer, click Restart now.
2. Download Ubuntu
We’ll need to grab the Ubuntu WSL distro from Microsoft. The distro will be a
- The link to the download page can be found here. If you prefer, you can use the same link to download OpenSUSE or SLES instead.
- Note: Only Ubuntu 16.04 is currently available for download. Ubuntu 18.04 will need to be installed from the Windows Store as Microsoft has not yet prepared Ubuntu 18.04 for a standalone server install.
3. Extract Files
The easiest way to unpack
Ubuntu.1604.appx is to use file archive tool like 7zip.
- Open the file explorer and navigate to the directory where you downloaded the Ubuntu
Using 7zip, extract the contents of the
.appxinto the current directory. You should now have a folder named
Ubuntu.1604.2017.711.0_v1containing the contents of the installer.
Ubuntu.1604.2017.711.0_v1is a rather messy name so we’ll go ahead and rename the folder to simply
Now move the
Ubuntufolder into your Windows home user directory
4. Installing Ubuntu
ubuntu.exeto begin the installation.
When the installation finishes, you will be asked to set your UNIX username and password. Enter in a name and password. The password entry will not be visible on screen.
We have successfully installed Ubuntu. The next step is to make sure we grab all the security updates for our distro.
- Run the following commands inside the Bash shell to update Ubuntu:
sudo apt update sudo apt upgrade
If you want to uninstall Ubuntu, you can do so using the
wslconfig.exe command line tool. This will completely remove the Ubuntu distribution.
- To uninstall, open the Windows Command Prompt and run:
wslconfig /unregister Ubuntu
From here, we can reinstall Ubuntu in a clean state if desired.