WSL2 comes with a performance and feature perks over the old system, including choice of Linux flavor and a different virtualization strategy. If for no other reason, though, it was simply time for an upgrade. Here's the shortnotes:

Get WSL2 Installed

Wasn't as straightforward as the MSDocs made it. I had to opt into the insiders program, with my computer having been out of date for almost a year -- the slow ring was enough to get the right version. A few restarts later and I had a latest enough build: 19041. Then it was a matter of:

Then the system was ready to start installing WSL2.

Distro Picking

From the MS Store pick out a distro. I stuck with Ubuntu. I had an issue getting the latest Ubuntu to download -- I had apparently tried to install Ubuntu 18.04 before (which is a separate download from Ubuntu latest - simply known as 'Ubuntu' in the store). Uninstalling that version worked fine.

Before booting the new Ubuntu I decided to copy any files I wanted to keep onto a separate drive -- thinks like dotfiles or projects I didn't want to re-clone. Doing this now made it easier later to just flip the switch, so take a moment if you haven't already.

Once ready, launch the new 'Ubuntu' app you downloaded and follow the prompt to setup your user. In my quick searches I couldn't find a way to migrate my existing user over easily, so I found it better to just go with the clean install approach. Once done, boot a Powershell and run wsl --set-default-version 2 followed by wsl --set-version <Distro> 2. If the commands succeeded your almost there. If they failed (like they did for me), you'll want to circle back to checking your System Updates.

Retire the Old System

wsl -l -v will list all your installed distros and their versions. For me this was Ubuntu on WSL 2 and Ubuntu (Legacy). WSL V1 might be what you'll find if you came to the party after Legacy. If you'd like to rid yourself of this, you're looking for the unregister command: wsl --unregister <distroName>. Verify with a wsl -l -v again to confirm it's removal.

System Prep - Terminal

With the new system ready, I like to get my pieces back in place. First was a terminal emulator. I used to use Cmder, but grew tired of that setup pretty quick. I moved onto Hyper but it too felt clunky after a lot of day-to-day use (little things like copy paste or resizing the window just got a bit too annoying). Recently on my Linux dual-boot I've been using Kitty which I've enjoyed, but Windows has no such option.

I opted for the new 'Windows Terminal':

System Prep - Environment

I won't cover everything, but here's a few that you might want:

Otherwise that's about it. If you're interested in ZSH, check out my notes on Setting up ZSH

Annoyance: Can't Copy from Vim

Problem: I want to yank some code from Vim and paste it in anything that's not vim. In Hyper I could simply highlight + right click, in Windows Terminal I can't.

Fix: Add the following snippet to your ~/.vimrc:

  " WSL yank support
  let s:clip = '/mnt/c/Windows/System32/clip.exe'  " default location
  if executable(s:clip)
      augroup WSLYank
          autocmd TextYankPost * call system('echo '.shellescape(join(v:event.regcontents, "\<CR>")).' | '.s:clip)
      augroup END