Running the Linux Subsystem inside an Azure Windows 10 VM

What is it?

The Windows Subsystem for Linux lets developers run Linux environments — including most command-line tools, utilities, and applications — directly on Windows, unmodified, without the overhead of a virtual machine.

This is the official definition published by Microsoft, here.

I read about it and thought it was a very good idea and approach to have a full Linux instance running inside Windows, there are multiple benefits for users, developers, aficionados, sysadmins, etc:

  • One single workstation to run both
  • Applications run natively
  • Not having to use a Virtual Machine
  • No more Dual-Booting
  • Running the GUI if needed or preferred.
  • Quite useful for entry-level and first timers of Linux, vi(m) is legendarily painful and hard for them.

UNIX/Linux guys be like 😝

There are different distributions available:

  • Ubuntu
  • Kali
  • SUSE
  • Debian

The How-To

I used a vanilla Windows 10 VM from the Azure Marketplace.

 First, run the command in Powershell

Reboot the VM instance.

Second, go to the Windows Store, select the Linux version you want and install it

Should take around 5-10 minutes

Once done, the normal user/password setup will occur

Ready, a new Linux Instance, running

Running GUI apps on it.

Running terminals commands and working on it is quite cool, running GUI application is even cooler which can be done:

Install VcXsrv, an Xwindows server which runs on Windows

Once that’s done, run it

Select VcXsrv

In the Linux terminal, export the display

Here are the Xeyes and bluefish

To make it simpler add the export DISPLAY command in the .bashrc file.

To install the Xeyes run the command

Happy Linux

@soyroberto