Installing PhpStorm on WSL2 Ubuntu

Mega quick notes on how I finally managed to install PhpStorm on Windows 11 WSL2 Ubuntu VM so that it starts in the XLaunch window server.

I have no idea what I’m doing so the terminology is probably completely wrong.

Let me know if this helps you on Twitter @GeeH

In Windows 11, install VCXSRV from https://nav.dl.sourceforge.net/project/vcxsrv/ – I have no idea if this is needed or not but I’d already done it 🤷.

Enable systemd (from https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/)

Create a file at /etc/wsl.conf containing:

[boot]
systemd=true

Start snap at startup:

sudo systemctl unmask snapd.service
sudo systemctl enable snapd.service
sudo systemctl start snapd.service

Install PhpStorm using Snap

sudo snap install phpstorm --classic

Install Java

sudo apt install default-jre

Start PHP storm with phpstorm

BONUS STUFF

Installing Docker

https://docs.docker.com/engine/install/ubuntu/

Setting up Docker so it can be used by logged in user

https://docs.docker.com/engine/install/linux-postinstall/