Windows Subsystem for Linux
I’ve been wanting to see WSL2 for myself, so I picked up this Thinkpad T440s off of eBay and started playing around.
I started by installing the following on the T440s:
- Docker Desktop for Windows (Edge)
- Windows Subsystem for Linux 2
- Windows Terminal
- Visual Studio Code with WSL extension
- 2004 Windows Update
It was quite easy to install everything after I enabled hardware virtualization. I was running Windows 10 Pro, which uses Hyper-V to run Windows containers (If you wish to do so). Check out my article here to see the difference between Hyper-V and Windows server containers.
I noticed that since I installed Docker Desktop (with the Windows 2004 update), and WSL is now used to run Linux containers, it prompted me to install WSL with the appropriate PowerShell command. How convenient!
Also, once the initial WSL2 install was complete, it suggested I install the patch (link included) via msi.
After all this, I still needed a distribution. I grabbed Ubuntu 20.04 from the Microsoft store by just searching
Ubuntu and clicking install (piece of cake). While I was in the store, I also installed Windows Terminal as an easy way to have Windows PowerShell, WSL Ubuntu, and Cloud Shell all running in the same window.
I know Visual Studio Code comes with a built-in terminal, but Windows Terminal was still a pretty cool tool for working in cross-platform datacenters.
After Installing Visual Studio Code, connecting to my WSL instance was a sinch as soon as the WSL extension was added.
Once the extension was added, I clicked on the green remote icon in the lower left, and vscode prompted to start a new connection.
Once I selected “New Window Using Distro” for my connection type, the distro that I installed via the Microsoft store appeared as an option to select.
That opened up a new window and the connection to my WSL distro was complete.
Getting to work
Now that everything is installed, now it’s time to get to work!
To be continued….