Windows Subsystem for Linux

Posted August 10, 2018 by Matthew McGeehan

Have you ever been stuck on a Windows machine but really wanted to use a utility like grep or dig. For the longest time, Cygwin was my go to solution. As much as I like Cygwin, it is not without its faults. Enter the Windows Subsystem for Linux. I was a little skeptical at first, but have been pleasantly surprised with the results. There are quite a few different Linux flavors available including Ubuntu, OpenSUSE, SLES, Kali, and Debian. Below are the steps I took to get WSL up and running with Debian.

Getting WSL up and running:

  1. Run PowerShell as admin and enter the following command to install the WSL feature. Please note you will be prompted to reboot your machine.
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  2. After reboot, open PowerShell and run the command below to download the Linux distro.
    Invoke-WebRequest -Uri -OutFile debian.appx -UseBasicParsing
  3. Once the file download is complete, run the following command.
  4. .\Debain.appx
  5. Windows will ask if you want to install Debian Linux.
  6. Install
  7. After installion is complete, you will be prompted to create a Linux username and password. This account will only be used for the Linux system.

Side note:

The Windows filesystem is accessible from the Linux shell under /mnt. Example: /mnt/c:

One more thing:

Who knew that you could use curl in Windows 10? Curl was added in the Windows 10 Spring 2018 Update.