I’m going to assume that you’re more excited than you’ve ever been and want to know exactly how you can partake in such wonderment.

Well alright then…

Step by step…

Hit start (I assume you’re ready to go)

(I assume you’re ready to go) Type “windows features”

Hit Enter

Tick the Windows Subsystem for Linux box

box Click OK

Hit Start

Type “powershell”

Right click it and click Run as administrator

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

Hit Enter

Restart. This isn’t one of those things where it says you need to restart but you don’t really need to restart. You really need to restart.

After the restart….

Hit Start

Type “cmd”

Hit Enter

In the command prompt type bash and hit Enter.

This is how you launch the instance of Linux. Since it’s the first time you’ve done this, it will kick off the download of the Ubuntu image from Canonical (which is the non-GUI ‘user-mode Linux’, similar in concept to Windows Server Core). In future, you can access Linux bash in one of two ways:

Open a command prompt and type bash Run the dedicated Bash on Ubuntu on Windows app which I snuck in and installed while you were reading my poem

You now have a nice clean install of Linux ready to go, so let’s…

Install NodeJS

Installing Node is exactly the same as installing Node on any Linux box, specifically, type these two lines, as explained in the Node docs:

curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -

sudo apt-get install -y nodejs

(Or whatever version you want.)

Now you’ve got Linux and Node. This is easy, right?

So what exactly is happening here?

As soon as you type bash and hit enter, you’re essentially in Linux. There is the usual Linux directory structure of course, but in addition to this you’ll find your Windows directories mapped to /mnt . For example, if you have a project in C:/web/my-project you would find this in /mnt/c/web/my-project . Windows helps you out by keeping your working directory the same when you change into Linux. So if you’re in the command prompt at C:\Users\David and type bash , you’ll be taken to /mnt/c/users/david in Linux.

I found it all a bit mind bending at first; the trick is not to think about it.

You want more?

If you’re super excited about how this works under the hood, there’s quite a few blog posts from Microsoft about it. If you have questions and suspect they are asked frequently, click right here. If you’ve got a problem, check out their GitHub issues, it’s quite an active little place.

What are some random tips on accessing the command prompt?

From Explorer with mouse

If you’re in Explorer looking at your project, hold shift, right click and select Open command window here

secret-squirrel right click menu

From Explorer — weird shortcut

If you’ve got your project folder open in Explorer, hit alt+D then type cmd and hit Enter.

Weird, right? I discovered this cleaning my keyboard one day.

Set the default path for a command prompt

Open a command prompt, then in the taskbar, right click the icon, then right click Command Prompt (right click inception) and click properties.

You can then enter a value for Start in, which is the directory command prompt will … start in.

Don’t forget to pin that icon to the taskbar. Now when you click the icon to open command prompt it will open in the correct directory.

Can I set this as my default terminal in WebStorm?

Yep. With some caveats.

How does this interact with the network and filesystem?

I have no idea.

Do all of the filesystem/network feature of NodeJS work with this?

Look, behind you! Is that a bear? Oh my god I think that’s a bear!

Will it work with file watching and hot reloading?

[Looks at watch] I’m afraid that’s all we have time for today, thank you all for coming.

[cracks whip]