WSL is pretty fantastic although its disk access is slower than native Linux, I find myself using it every day. If you want to setup Linux on your Windows 10 machine, just turn it on, then head over to the Windows Store and search for “Linux.”

You can turn on Linux on Windows 10 by typing “Windows Features” and checking “Windows Subsystem for Linux.” Then get a Linux from the Windows Store.

If you prefer to use PowerShell and do it in one line, just do this from an Admin PowerShell prompt:

When you’re in a Windows shell like PowerShell or CMD you might want to run Linux and/or jump comfortably between shells. You can do that in a few ways. The best and recommended way is running “wsl.exe” as that will start up your default distro. You can also just type the name of the distro. So I can type “ubuntu” and get in there directly.

You can type “bash” but that’s not recommended if you’ve changed shells. If you’ve set up zsh or fish and type bash, it’s gonna still try to run bash.

Here I’ve typed wslconfig and you can see I’ve got both Ubuntu and Debian installed, with Ubuntu as the default when I type “wsl.”

Now that I know how to run wsl from anywhere I can even pipe stuff in and out it Linux from outside. For example here I am in cmd.exe but I’m calling commands in Linux, that come out, then back in, etc. You can mix and match however you’d like!

This means even when I’m in CMD or PowerShell I can use Linux commands that are convenient or familiar to me. For example, here I’m piping a Windows Update log file into a the Linux command sha1sum command. Note the use of – to accept standard input – even though that input is from Windows!