Table of Contents
Microsoft introduced Windows Subsystem for Linux (WSL), a free, optional feature of Windows 10 that allows Linux programs to run on Windows. It provides you with a Windows version of the bash shell and a compatibility layer that permits many Linux programs to run natively on your Windows machine. WSL is available only in 64-bit versions of Windows 10 from version 1607. It is also available in Windows Server 2019.
- Open Start.
- Search for PowerShell, right-click the top result, and select the Run as administrator option.
- Type the following command to enable the Linux subsystem and press Enter:
1 2 3 4
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart -OutVariable results if ($Results.RestartNeeded -eq $true) { Restart-Computer -Force }
- Open Start
- Search for PowerShell, right-click the top result, and select the Run as administrator option.
- Type the following command to select the download folder and press Enter:
1
Set-Location $env:UserProfile\Downloads
-
Type one of the the following command to download Ubuntu and press Enter:
- Ubuntu 16.04: https://aka.ms/wsl-ubuntu-1604
1
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile Ubuntu1604.appx -UseBasicParsing
- Ubuntu 18.04: https://aka.ms/wsl-ubuntu-1804
1
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile Ubuntu1804.appx -UseBasicParsing
- Debian: https://aka.ms/wsl-debian-gnulinux
1
Invoke-WebRequest -Uri https://aka.ms/wsl-debian-gnulinux -OutFile Debian.appx -UseBasicParsing
- openSUSE: https://aka.ms/wsl-opensuse-42
1
Invoke-WebRequest -Uri https://aka.ms/wsl-opensuse-42 -OutFile openSUSE.appx -UseBasicParsing
- SLES: https://aka.ms/wsl-sles-12
1
Invoke-WebRequest -Uri https://aka.ms/wsl-sles-12 -OutFile SLES.appx -UseBasicParsing
- Ubuntu 16.04: https://aka.ms/wsl-ubuntu-1604
- Type the following command to view the actual name of the installer and press Enter:
1
Get-ChildItem
Type the following command to install Ubuntu version 16.04 and press Enter:
1
Add-AppxPackage .\APP-NAME.appx
This example installs the Ubuntu distro on Windows 10:
1
Add-AppxPackage .\Ubuntu1804.appx
- Open Start
- Search for the recently distribution Linux distribution (for example, Ubuntu), click the top result to launch the experience.
- Create a username for the Linux distro and press Enter.
- Specify a password for the distro and press Enter.
- Repeat the password and press Enter to confirm.
After you complete the steps, you can start using Ubuntu or any other distro as you would on a full installation of Linux without a graphical interface.