How to upgrade Ubuntu in place on WSL / WSL2

WSL Ubuntu do-release-upgrade made easy!If you’re using Windows Subsystem for Linux (WSL), you may be wondering how to upgrade your flavor of linux in place.

Whether you’re using WSL or WSL2, you could just go to the Windows Store and download the whole new shebang.

In my case, I was using Ubuntu 18.04 LTS, and it’s gonna die in the near future. So, I wanted to do a double-upgrade from 18.04 to 20.04 to 22.04. I’ve got a ton of stuff installed and configured, shell scripts set up, rsync, git, and so on – and I didn’t want to have to redo all of it.

Due to some strange error messages when you try do-release-upgrade, it doesn’t seem like you can do an in-place upgrade in WSL1/2 – but you can!

(more…)

“Linux on Windows” missing after a Win 10 upgrade? No problem!

Another Windows 10 upgrade is here: the Windows 10 October 2018 update.

For those of us using WSL, or “Linux on Windows”, that means potential mayhem.

When the last Win 10 upgrade version was released, I installed it. I then discovered that my Ubuntu icon no longer loaded anything – except a Bash window with an error message that Ubuntu on Windows was no longer installed!

Oops.

Fortunately, it’s pretty easy to fix!

(more…)

Run cron jobs in Windows Subsystem for Linux

If you’re running Ubuntu or another linux shell in Windows 10 via WSL (Windows Subsystem for Linux), you’ve probably wondered about using cron.

Cron is super-handy for doing things, like, running a backup.

You see, as useful as WSL is, it stores all the linuxy files in a way that is not exactly easily backup-able by File History or anything else… as far as I can tell.

Worse yet, even when you try to set up a cron job to run a backup, it doesn’t work!

What to do, what to do?

(more…)

How to update or install “Linux on Windows” in Windows 10

In the olden days, there was only “Bash on Ubuntu on Windows 10”. This little gem gave you something like reverse WINE.

You got an Ubuntu linux install that’s running on top of the Windows kernel – with full file system access, the ability to install and run all kinds of linux command-prompty stuff like git, and even graphical linux apps like gitk.

Fast forward a few years, and things have changed…

What if you’re still running Bash on Ubuntu on Windows (Ubuntu 14.04) and you want to upgrade to the latest Ubuntu 16.04 without reinstalling everything?

Or, what if you want a different flavor of linux?

(more…)