Installing the Windows Subsystem for Linux


What is the Windows Subsystem for Linux?
Preparing a Windows 10 client
Why do I need a Linux shell?

Using cloud operating systems like OpenStack and AWS means using native Linux tools, Windows laptops do not have native support for SSH, secure copy paste, PEM encoded key pairs, command line clients etc. Please follow these instructions to setup a better user experience for OpenStack, AWS, Kubernetes etc.


Step 1. Launch Windows PowerShell as Administrator

Open PowerShell as Administrator. the default security profile for PowerShell is to disable running remote scripts, first step is to unrestrict the execution policy


Once you have PowerShell open as Administrator, set the default policy with the command:

In PowerShell:

Set-ExecutionPolicy Unrestricted


unrestricted

Step 2. Enable the Optional WSL Feature

Install the Windows subsystem for Linux

In PowerShell:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux



Install Linux

Once the machine has been prepared with the Linux subsystem, you can install a distribution of Linux from the Microsoft store, or you can download from Powershell using the following command:

In PowerShell:

Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile Ubuntu.appx -UseBasicParsing


appx is the file format of Windows store applications, you can install them from PowerShell with the following command

In PowerShell:

Add-AppxPackage Ubuntu.appx


On first launch you will be asked to setup a username and password, I recommend that you use the username 'ubuntu' as this will become the default ssh username


ubuntu