Bash / Windows Subsystem for Linux

As an alternative to setting up a dual booting system with Windows and Linux more advanced users, who prefer a Linux Command Line Interface (CLI), may choose to install Windows Subsystems for Linux (WSL) and Linux Bourne-again shell (bash). Windows WSL and bash will allow a user to access a Linux CLI while using Windows. There are several Linux distributions available.


Checking Windows Build Number

Before installing WSL and bash it is important to determine if Windows 10 is running a version of the operating system that supports WSL. A Windows 10 version of Creators Update (1703) or later is required.

Settings > System > About

Scroll down to the “Windows specifications” section

Installing WSL – Using PowerShell

Note

Installing WSL will require a restart of Windows 10. Before proceeding please save any work and close any open files.


The most efficient way to install WSL is to use Windows PowerShell. Open PowerShell as administrator.

  1. Press and hold the Windows keyboard key and press X.
  2. On the Windows Quick Access Menu click on Windows PowerShell (Admin).


  3. Click Yes to allow User Account Control to open PowerShell as an administrator.


  4. Type or paste the following command into the PowerShell console.
    Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  5. Press the Enter key to execute the command.

Installing a Linux Distribution

  1. Open the Windows Store.


  2. Click on the Windows Start Menu Icon.
  3. Type Store.
  4. Double click on the Microsoft Store App.
  5. In the Store App search for “Linux” or "WSL" or for any of the Linux distributions based on preference. The following Linux Distributions are free in Microsoft Store.
    • Debian
    • Ubuntu
    • Kali
    • CentOS
    • OpenSUSE
    • Alpine
  6. Click on the Linux App to install it. The example below shows CentOS7 as an example. The process is the same for any Linux distribution listed above.


  7. Click Get.
  8. Click Sign in, if prompted.


  9. Sign into the Microsoft Store App with your existing Microsoft account or create a new account by clicking on “Create one!”.
  10. Click Install.
  11. A status bar will display the installation progress. Wait the install completes.


  12. Click Launch.
    1. Another method to start a Linux shell is to click on Window Start Menu icon.
    2. Type the name of the distribution or Linux app you installed.
    3. Double click on the app to open a Linux shell.

Change your Linux Root password

  1. In the Linux CLI type passwd and press the Enter key.


  2. Follow the prompts and enter a new password and press Enter. Retype the new password to confirm it and press the Enter key to change the root user password.


Microsoft documentation:

Windows Subsystem for Linux Installation Guide for Windows 10

For more help, please contact our helpdesk at busn.help@uconn.edu