Manage WSL like a boss with LxRunOffline

Download LxRunOffline from Github and add it to the PATH so it can be accessible from anywhere.

Download Ubuntu form the links below, then extract the .zip file.

# Ubuntu 16.04
https://aka.ms/wsl-ubuntu-1604

# Ubuntu 18.04
https://aka.ms/wsl-ubuntu-1804

To install Ubuntu 16.04 as ubuntu16 in C:\wsl\ubuntu16

# Change according to your preference
LxRunOffline i -n ubuntu16 -d "C:\wsl\ubuntu16" -f "/full/path/to/install.tar.gz"

Login to Ubuntu using

wsl

Once logged in, create a new user (Eg: harry)

adduser harry

Give the user (harry) sudo access

usermod -aG sudo harry

To set harry as default user instead of root, run command from CMD

LxRunOffline su -n ubuntu16 -v 1000

Useful links:

https://wiki.ubuntu.com/WSL