Windows Subsystem For Linux (WSL)

less than 1 minute read


Here is how to Enable Windows Subsystem For Linux. What this does is allow you to interact with Linux machines on the network natively.

To Resolve:

  1. If you have W10 Creators update:

Open PowerShell as Administrator and run:

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

After installation your Linux distribution will be located at: %localappdata%\lxss.

1a. If you don’t yet:

#Turn on Developer Mode

#Open Settings -> Update and Security -> For developers

Then do it.

  1. Open a command prompt. Type: bash

This will ask you something, just say yes. Then it will have you create a user and password.

  1. First, change the root password: sudo passwd root

  2. Now try creating a file in your Windows system from the linux system:

cd /mnt/c/Users/%username%/Documents

touch myfile.txt

vi myfile.txt

(type whatever) then press keyboard keys Ctrl+o

Check from Windows. It’s there!

  1. Now you can do the standard updates:

sudo apt-get update && sudo apt-get upgrade

  1. Start interacting with your servers using ssh and other linux tools! For more info, see here.