Windows 10 now includes the ability to run a Linux shell within it.  That alone is pretty awesome.  What’s even awesome…er…is that you can easily access that sub-system from Windows with the wsl.exe utility.  Try this out:

Step 1: Launch your Linux subsystem

On my Windows laptop, I installed an instance of Ubuntu.  From my home directory, I simply list the directory contents:


1
2
3
4
5
6
7
8
9
brad@brad-laptop:~$ ll
total 8
drwxr-xr-x 1 brad brad 4096 Aug 26 13:57 ./
drwxr-xr-x 1 root root 4096 Aug 25 21:08 ../
-rw-r--r-- 1 brad brad  220 Aug 25 21:08 .bash_logout
-rw-r--r-- 1 brad brad 3771 Aug 25 21:08 .bashrc
-rw-r--r-- 1 brad brad  807 Aug 25 21:08 .profile
-rw-r--r-- 1 brad brad    0 Aug 25 21:11 .sudo_as_admin_successful
-rw-rw-rw- 1 brad brad    0 Aug 26 11:04 test.txt

Step 2: Open up the Windows command shell

Now, open up a Windows command shell.  Using wsl.exe, list the contents of your home directory.  Interestingly, while my Ubuntu instance knows the “ll” alias, wsl does not.  Nevertheless, I can run the ls -l command and see the contents of my home directory.

What if you have multiple Linux sub-systems installed?

Initially, I installed multiple Linux sub-systems on my Windows machine, but could find no way to get wsl to target a specific system.  There may well be an option: I just haven’t been able to find it yet.  Regardless, this advent from Microsoft now opens up so many more options, as there are a variety of wonderful tools in Linux that either can’t be installed in Windows or can’t easily be installed.  Now, you don’t have to: just install those tools in your Linux sub-system and run them there or from Windows via wsl.exe.