LazyCodet

a

09:58:54 18/6/2025 - 10 views -
Programming

WSL - Zero to Hero

Create a new distro

Download rootfs Ubuntu

​Download: https://cloud-images.ubuntu.com/releases/22.04/release/

Choose file: : 📦 ubuntu-22.04-server-cloudimg-amd64-root.tar.xz

​Run command to create

wsl --import PMJ-Ubuntu-22.04 D:\WSL\PMJ-Ubuntu-22.04 C:\Users\rcvn\Downloads\ubuntu-22.04-server-cloudimg-amd64-root.tar.xz --version 2

Set this new distro as the default (optional)

wsl --set-default PMJ-Ubuntu-22.04

Open a folder with Windsuft

sudo ln -s '/mnt/c/Users/<username>/AppData/Local/Programs/Windsurf/bin/windsurf' /usr/local/bin/ws

​Replace <username> with your current username, and after that, you can open a folder in Windsuft with the command:

ws .

​Install Docker without Docker Desktop

https://dev.to/felipecrs/simply-run-docker-on-wsl2-3o8

Nếu sau khi cài xong chạy các lênh docker và docker compose bị báo lỗi:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

​Thì bạn hãy chị lệnh sau:

sudo service docker start

Open current folder in WSL on File Explorer

explorer.exe .