How to run Ubuntu using the Windows Subsystem for Linux

WSL, or Windows Subsystem for Linux, is a Microsoft-designed compatibility layer that allows users to install GNU/Linux distributions and natively run Linux binaries on both Windows 10 and Windows Server 2019.

-Advertisement-

Earlier this week, we reported on the first-ever Windows Linux conference, WSLconf 1, this coming March.  WSLConf 1 promises to center on Microsoft’s Windows Subsystem for Linux (WSL).

WSL, or Windows Subsystem for Linux, is a Microsoft-designed compatibility layer that allows users to install GNU/Linux distributions and natively run Linux binaries on both Windows 10 and Windows Server 2019.

Although I had heard of WSL before, I had not yet made the plunge in exploring the technology.  News of WSL Conf 1 prompted me to do so.  Am I ever glad I did?

Can We Run Windows Subsystem for Linux (WSL)?

To get rolling with WSL, we need to log into our Windows 10 workstation or Windows 2019 server.  In our case, we are using Windows 10.

-Advertisement-

The 2018 Fall Creators Update Windows 10 shipped with the Windows Subsystem for Linux, so we need only to enable this optional feature to install.

Before installation, we have to ensure our system can support WSL.  We must be running the 64-bit version of Windows 10 (found next to System Type under About) and that we’re running Windows 10 build 14393 or later (located next to OS Build under Windows specification).

We can check this by going to Settings | System | About.

Verify that your machine can run Windows Subsystem for Linux (WSL)
Verify that your machine can run Windows Subsystem for Linux (WSL).

-Advertisement-

If your machine is not 64-bit, unfortunately, you cannot run WSL.

If your Windows 10 build is not 14393 or later, just run Windows Update to ensure you can.

Now that we have our requirements out of the way let’s get going.

Enable Windows Subsystem for Linux (WSL)

To enable WSL, click Windows Start and search for Windows Features.  When the Turn Windows Features on or off item displays, select it.

-Advertisement-

Enable WSL in Windows Features
Enable WSL in Windows Features.

Once the list populates, scroll down to Windows Subsystem for Linux, and ensure that it’s checked.  Click OK.

Please be patient as Windows installs the required files.

Allow Windows Features to Reboot
Allow Windows Features to Reboot.

After Windows has installed WSL, allow Windows to reboot your PC.

After Windows has rebooted, log in and click Windows Start | Run, and type cmd in the box.  Click OK.

Type bash <Enter> at the Windows command prompt
Type bash at the Windows command prompt

To start WSL, type bash <Enter> at the Windows command prompt.

Notice that we have no installed distributions.  Let’s resolve that.

Install Ubuntu on Windows Subsystem for Linux (WSL)

From a web browser, head to https://aka.ms/wslstore.  Click OK to allow Windows to launch the Microsoft Store.

Linux Distributions available for WSL
Linux Distributions available for WSL

Once at the store, notice the various distros available for WSL.

For our purposes, we wi install Ubuntu.  Double-click the Ubuntu icon.

Get Ubuntu from the Microsoft Store
Get Ubuntu from the Microsoft Store

Select Get to start the download from the Microsoft Store.

Please be patient while the WSL Ubuntu distro downloads
Please be patient while the WSL Ubuntu distro downloads.

Please be patient while the WSL Ubuntu distro downloads.

Choose Launch to start the WSL Ubuntu install
Choose Launch to start the WSL Ubuntu install.

After the download completes, click Launch.

Please be patient while Ubuntu installs in WSL
Please be patient while Ubuntu installs in WSL.

Please be patient while Ubuntu installs in WSL.

Successful installation of Ubuntu in WSL
Successful installation of Ubuntu in WSL

After Ubuntu successfully installs on Windows 10, enter your new UNIX username when prompted.  Also, enter and verify your password.

As with all Linux installations, we want to both update and upgrade our system before exploring and using.

Run the'sudo apt update' command.
Run the ‘sudo apt update’ command

From the terminal, start the update:

# sudo apt update

Run the'sudo apt upgrade' command.
Run the ‘sudo apt upgrade’ command

Next, initiate the Ubuntu upgrade:

# sudo apt upgrade

Select "Yes" to allow automatic service restarts
Select “Yes” to allow automatic service restarts

Select Yes if prompted to “Restart services during package upgrades without asking?“.  The upgrades should finish without issue.

Ubuntu "Bionic Beaver" successfully installed on the Windows Subsystem for Linux
Ubuntu “Bionic Beaver” successfully installed on the Windows Subsystem for Linux.

Congratulations!  You are now running Ubuntu on Windows 10.

The Windows Subsystem for Linux (WSL) Filesystem

Microsoft’s WSL uses its filesystem, installed in Windows at %LOCALAPPDATA%\.

With our installation, WSL resides under C:\Users\M Travis Rose\AppData\Local\.

Location of WSL directory/files under Windows
Location of WSL directory/files under Windows

Users should never move nor make changes to either the WSL directory or the subdirectories and files it contains.

WSL users can access Windows files via the WSL Linux distro at /mnt/c/.

Access your Windows files in WSL via /mnt/c/
Access your Windows files in WSL via /mnt/c/.

We strongly suggest you create symbolic links to your Windows home folder as well as other often accessed locations within your Windows file system for quick and easy access.

More to Come!

We now have a fully functional and updated version of Ubuntu running flawlessly inside Windows 10.  However, we have only command-line functionality.  We have no access to the rich GUI functionality and applications that Ubuntu affords us.

Fret not, in our next article on WSL, and we will fully exploit the functionality of WSL through the use of X11 forwarding by the installation of an X11 Server in Windows.  We shall also install not only a single GUI application in our new Ubuntu WSL distro but install and use an entire desktop environment

If you have used or are currently using WSL, please provide feedback on your experience and thoughts on Microsoft’s first foray into the wonderful world of Linux.

-Advertisement-
Travis Rose
Hi, I'm M Travis Rose, a contributor to FOSS Linux. I have over thirty years of experience in the IT arena, at least fifteen of which has been working with Linux. I enjoy converting existing Windows users to the wonderful world of Linux. I guess you could call me a Linux-evangelist. Long live Linux!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

23,636FansLike
361FollowersFollow
16SubscribersSubscribe

LATEST ARTICLES

Top 20 Git Commands with Practical Examples

If you are here reading this post, there is a high probability that you have heard or interacted with Github, and you now want to learn Git. Before we continue with showing you some of the cool Git commands, let's understand the difference between Git and GitHub.

Top 10 New Features in Linux Kernel 5.7

Linus Torvalds has announced the release of Linux Kernel 5.7 after seven weeks of development. The release announcement comes as a piece of exciting news as it brings a host of new features for the hardware manufacturers as well as the developers.

How to install CMake on Ubuntu

CMake is a cross-platform free and open-source software tool designed to build, test, and package the software. CMake uses a simple platform and compiler-independent configuration files to control the software compilation process.

How to install Lightworks on Ubuntu

Even though Linux may not get a native installer of video editing software like Adobe Premiere or Final Cut Pro, that doesn't mean there are no industry standards tools available. Lightworks is non-linear editing (NLE) video mastering app for Windows, Linux, and macOS. Installing it on Ubuntu is simple due to deb package availability.

How to install DaVinci Resolve on Fedora

Davinci Resolve is a professional application used for color correction, video editing, visual effects, and motion graphics. It is one of the extensively used software by movie industries located in Hollywood.

The 10 Best Programming Languages for Hacking

One of the significant entities we have in Cyber Security is Ethical Hacking (ETH). It is the process of detecting and finding flaws or vulnerabilities in a system that a hacker would exploit.

MUST READ

Linux is growing faster than ever. As per the latest report, there is a drop in the Windows 10 market share for the first time, and Linux's market share has improved to 2.87% this month. Most of the features in the list were rolled out in the Pop OS 20.04. Let's a detailed look into the new features, how to upgrade, and a ride through video.
Elementary OS 5.1 Hera has received a point release with a handful of new features and bug fixes, and we will be reviewing the significant changes in this article. For those new to elementary OS, this Ubuntu-based Linux distribution uses their inhouse built Pantheon desktop environment and AppCenter.

What is FOSS, and how does it differ from Freeware

The rise of the Linux operating system, in all its various distributions, over the past few decades has catapulted the popularity of Free or Open Source Software (FOSS). Let's guide you in understanding what is FOSS, how it differs from freeware and is Linux a FOSS.

Enabling GameMode on Linux for best gaming performance

GameMode is a combination of various libraries and daemons that allows all the users to improve the gaming performance on the Linux system. Developed by games publisher Feral Interactive, it improves gaming performance by requesting a group of options that will be applied temporarily to the Linux system.

[Guide] apt vs apt-get commands, and which one to use?

Most Linux users, both veterans, and newbies, often get confused about what the difference between the Linux commands apt, and apt-get are and when they should use one or the other.

Removing the Virus from a Windows PC with a Ubuntu Live USB drive

In this tutorial, we are going to show you how to clean your Windows machine from infected viruses using an Ubuntu live USB or CD and the ClamAV antivirus. The ClamAV is a free, open-source antivirus that can be used on Ubuntu.