WSL

Updated: 05/06/2024 by Computer Hope
Windows for Linux combines the best of both systems.

The Windows Subsystem for Linux, or WSL, is an optional feature of Windows 10 that allows Linux programs to run natively on Windows. WSL was designed by Microsoft in partnership with Canonical, the creators of Ubuntu. Together, they created a kernel compatibility layer based on Ubuntu. This compatibility layer allows Linux programs to run in a Windows 10 version of the Bash shell.

What can WSL be used for?

WSL gives Windows users access to powerful core programs available in Linux including GNU (GNU's Not Unix) tools such as find, awk, sed, and grep, which can locate, search, and modify the contents of files.

Not all Linux programs can be used in WSL. Some low-level system tools, for example, require an actual Linux kernel to run correctly. Also, WSL is not intended to run GUI (Graphical User Interface) applications. Although it's possible to install the X11 window system under WSL, graphical programs are not guaranteed to work correctly, if at all.

However, WSL comes with the software package tools apt and dpkg, which provides access to a thousands of command-line Linux applications. They can operate side-by-side with traditional Windows applications, with native access to the Windows filesystem. In essence, WSL makes Linux tools a part of Windows.

Requirements

WSL requires a 64-bit version of Windows 10, with the Anniversary Update (released on August 2, 2016) or later installed.

How to install WSL

To install the Windows Subsystem for Linux follow the steps below.

  1. Click Start, type cmd, right-click Command Prompt in the search results, and choose the option to run as Administrator.
  2. Once at the command prompt, type wsl --install and press Enter.

or

  1. Open a PowerShell window as Administrator.
  2. At the PowerShell prompt, run:
 Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

You are prompted to reboot the computer. Type Y and press Enter.

After the computer reboots, open a new command prompt window.

At the command prompt, run bash to complete the installation.

Tip

For detailed installation instructions and a guide to using WSL for the first time, see: How to install WSL on Windows 10.

Bash, Command prompt, Computer abbreviations, Linux, Operating System terms, TLA, Ubuntu, Windows 10