Make Windows normal again

Make Windows normal again

An Overview of Developer Tools for Windows - Welldone Software - Medium

WSL Related

Linux’izing your Windows PC into a dev machine – Part 2 |

Composer on WSL


The mysql user folder is not set correctly by default and the server will complain about it when started (No directory, logging in with HOME=/). To fix, change the mysql user’s home directory to /var/lib/mysql:

sudo usermod -d /var/lib/mysql mysql

I had to add protocol=TCP in /etc/mysql/my.cnf

In my app living in WSL, changing the host from localhost to in also helped.

# /etc/mysql/mysqld.conf.d/mysqld.conf

sudo add-apt-repository ppa:mysql-ubuntu/mariadb-10.1
sudo apt-get update
sudo apt-get install mariadb-server

grep socket -R /etc/mysql/

## /etc/mysql/mysql.conf.d/mysqld.cnf

Go to the file /etc/mysql/debian.cnf which has as the format:

host     = localhost
user     = debian-sys-maint
password = XXXXXXXX
socket   = /var/run/mysqld/mysqld.sock 
Take from there the password, that is randomly generated when installing MySQL (e.g. it differs between servers);

mysql -udebian-sys-maint -p02cShQo3PUHOFfzY

mysql -udebian-sys-maint -p02cShQo3PUHOFfzY --protocol TCP -h

[WSL 2] NIC Bridge mode 🖧 (Has Workaround🔨) · Issue #4150 · microsoft/WSL · GitHub

Find the IP address of your WLS2 Ubuntu host (use ifconfig) and connect to that IP using your Web browser.

sudo usermod -aG docker $USER

You will need to log out for this change to take effect.

Lando? wget

Multipass is WSL2 alternative

Multipass - Orchestrates virtual Ubuntu instances

That’s Ubuntu take on WSL2. Creating an instance is much slower, but much more things work (snaps without hacks). Is also supports cloud-init (as Hetzner Cloud and Exoscale also do). In essence, it is what Vagrant used to be.

multipass launch --name mpass
# or even without name

# enter the instance shell
multipass shell mpass

Working with Multipass instances

To be honest, Vagrant does do that. For sure, just like in theory KVM or Vmware can be used for that too. You can also set up a build farm and a Jenkins server to try to run “hello world”. The advantage of multipass is that to use it, all you have to do is:

snap install multipass

Snaps won’t work on WSL2

snaps don’t work on WSL2 as you need them for every command installed in that way!

The easiest way is to use snap (it is cross-distribution packager):

Using snapd in WSL2 - WSL2 - Ubuntu Community Hub Snapd on WSL2 (Insiders only for now) - snapd - arkane-systems/genie: A quick way into a systemd “bottle” for WSL

sudo apt install -y daemonize

# this must be done on reboot
sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd 

# this must be done on every login to WSL
exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME 

snap version
sudo snap install kubectl --classic

Compiling kernel on WSL2 is easy: k3s on WSL2

How to register JetBrains PhpStorm

  1. Add the line to hosts file
  2. Enter activation key (mine worked from
  3. We can host our own jetbrains-license-server

Use PhpStorm for WordPress Development

Installing Windows Subsystem For Linux For Web Development On Windows

date 11. Oct 2019 | modified 29. Dec 2023
filename: Windows » Dev Environment » Dump