Install Ubuntu on Windows with WSL2: A Low-Code Friendly Guide
From zero to a real Ubuntu terminal inside Windows — configured correctly from day one
At a Glance
Updated 95 days agoWSL2 gives you a genuine Ubuntu terminal inside Windows — no dual-boot, no heavy virtual machine. Essential if you run Docker, n8n, or any self-hosted AI tooling. This guide covers every step: installation, RAM configuration, enabling systemd, and avoiding the #1 performance mistake.
Why Low-Code Users Need WSL2
If you're running n8n, Flowise, or self-hosting any AI tooling — you need Docker. Docker on Windows runs best with WSL2 as its backend. Beyond that: Python, Node.js, and Git all run faster and more predictably in a real Linux environment.
WSL2 gives you a genuine Ubuntu terminal inside Windows — no dual-boot, no heavy virtual machine. Set it up once and it's always there. See how to build a data pipeline with n8n and Postgres to understand what WSL2 unlocks for your automation workflow.
Prerequisites
- Windows: Windows 10 Build 19041+ or Windows 11 (recommended)
- RAM: Minimum 8 GB (16 GB recommended)
- Virtualization: Must be enabled in BIOS/UEFI
Quick check: Ctrl + Shift + Esc → Performance tab → CPU → look for Virtualization: Enabled. If it shows "Disabled", enter BIOS and enable VT-x (Intel) or AMD-V before proceeding.
Install — One Command
Open PowerShell as Administrator (right-click Start → "Windows PowerShell (Admin)"):
wsl --install
This automatically enables WSL and Virtual Machine Platform, installs the latest Linux kernel, sets WSL 2 as default, and downloads Ubuntu. Restart when prompted — Ubuntu opens on reboot and asks you to create a username/password.
To install a specific version:
wsl --install -d Ubuntu-24.04
Required Configuration — Don't Skip
1. RAM Limit with .wslconfig
By default, WSL2 can consume up to 50% of system RAM. Create C:\Users\your-name\.wslconfig:
[wsl2]
memory=8GB # ~50% of total RAM
processors=4 # CPU cores to allocate
swap=2GB
[experimental]
autoMemoryReclaim=gradual # Automatically returns RAM to Windows
sparseVhd=true # Virtual disk shrinks when files are deleted
Adjust based on your machine:
| Total RAM | memory= | processors= |
|---|---|---|
| 8 GB | 4GB | 2 |
| 16 GB | 8GB | 4 |
| 32 GB | 16GB | 8 |
2. Enable systemd
Inside Ubuntu:
sudo nano /etc/wsl.conf
Add:
[boot]
systemd=true
[automount]
enabled=true
options="metadata"
Run wsl --shutdown and wait 8–10 seconds before reopening. systemd is required for Docker, snap packages, and background services to function correctly.
3. Update the System
sudo apt update && sudo apt upgrade -y
sudo apt install -y git curl wget build-essential ca-certificates
The Golden Rule: File System Performance
Storing projects in
/mnt/c/Users/...and running Linux tools on them is 10x slower.
| Tool type | Where to store files |
|---|---|
| Linux tools (npm, python, git...) | /home/your-name/projects/ |
| Windows apps (Office, Photoshop...) | C:\Users\your-name\ |
Access Linux files from Windows Explorer: \\wsl$\Ubuntu\home\your-name\
From Ubuntu terminal: explorer.exe . — opens the current folder in File Explorer.
Essential Tools for Low-Code
Windows Terminal — replaces the default Ubuntu window. Install from Microsoft Store. Set Ubuntu as the default profile. Starting directory: \\wsl$\Ubuntu\home\your-name
VS Code Remote Development — install VS Code on Windows, then install the "Remote Development" extension by Microsoft. From Ubuntu terminal in your project folder:
code .
VS Code connects into WSL2 and displays a green badge in the bottom-left corner.
Node.js via nvm (more flexible than apt):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
nvm install --lts
Python:
sudo apt install -y python3 python3-pip python3-venv
Docker (for n8n, Flowise, Appsmith... — requires systemd enabled):
sudo apt install -y docker.io docker-compose
sudo usermod -aG docker $USER
Common Mistakes to Avoid
| Mistake | Fix |
|---|---|
Storing projects in /mnt/c/ | Always use /home/your-name/projects/ |
| Not limiting RAM | Create .wslconfig before heavy workloads |
| Config changes not taking effect | Run wsl --shutdown and wait 8–10 seconds |
| Virtualization disabled | Check Task Manager → CPU → Virtualization |
| Outdated WSL kernel | Run wsl --update periodically |
Quick Checklist
- Virtualization: Enabled in Task Manager → CPU
-
wsl --installas Admin → restart - Create username/password on first Ubuntu launch
-
sudo apt update && sudo apt upgrade -y - Install Windows Terminal from Microsoft Store
- Create
.wslconfigwith appropriate RAM limits - Enable systemd in
/etc/wsl.conf→wsl --shutdown - Install VS Code + Remote Development extension
- Always keep projects in
/home/your-name/projects/
Comments (0)
Loading comments...