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

LEMP stack in WSL

add-apt-repository ppa:nginx/stable add-apt-repository ppa:ondrej/php apt-key adv –recv-keys –keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 add-apt-repository ‘deb [arch=amd64,arm64,i386,ppc64el] http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.2/ubuntu xenial main’ apt update && apt upgrade -y apt install nginx-extras mariadb-server php7.3-fpm php7.3-pdo php7.3-mysql php7.3-zip php7.3-gd php7.3-mbstring php7.3-curl php7.3-xml phpdismod opcache service mysql start mysql_secure_installation

Tweaking WSL (Windows Subsystem for Linux)

Change apt mirrors (India only) # Create backup first sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup # Download modified sources.list wget https://gist.githubusercontent.com/Dibbyo456/e395373796ffba5005aa5e771ad7da1b/raw/e6e0865a788929cb17b7d60b4863e8dd6f3f8026/sources.list # Replace sudo mv sources.list /etc/apt/ Fix files/folder permissions https://www.turek.dev/post/fix-wsl-file-permissions/ Add some useful aliases cd && touch .bash_aliases add below lines