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.
- Press and hold the Windows keyboard key and press X.
- On the Windows Quick Access Menu click on Windows PowerShell (Admin).
- Click Yes to allow User Account Control to open PowerShell as an administrator.
- Type or paste the following command into the PowerShell console.
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
- Press the Enter key to execute the command.
Installing a Linux Distribution
- Open the Windows Store.
- Click on the Windows Start Menu Icon.
- Type Store.
- Double click on the Microsoft Store App.
- 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
- 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.
- Click Get.
- Click Sign in, if prompted.
- Sign into the Microsoft Store App with your existing Microsoft account or create a new account by clicking on “Create one!”.
- Click Install.
- A status bar will display the installation progress. Wait the install completes.
- Click Launch.
- Another method to start a Linux shell is to click on Window Start Menu icon.
- Type the name of the distribution or Linux app you installed.
- Double click on the app to open a Linux shell.
Change your Linux Root password
- In the Linux CLI type passwd and press the Enter key.
- 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