All articles

Universal Development Environment Setup Guide

Category:

Install Windows Terminal

Windows Terminal is a modern app that lets you use different command lines like PowerShell and WSL in one window with tabs.

Get it from the Microsoft Store.

Install VS Code and Extensions

VS Code is a free and popular code editor.

Download it from code.visualstudio.com.

If you already have it, update it from the menu Help -> Check for Updates.

Install the WSL extension. This lets you open your Linux project folders in VS Code.

Install the Dev Containers extension. This lets you connect VS Code to a running Docker container. This is essential, because without it, your code editor cannot see the project’s dependencies that are only installed inside the container. By connecting, you get full code completion and suggestions (IntelliSense).

Install WSL2 (Windows Subsystem for Linux)

WSL2 lets you run a real Linux system (like Debian) inside Windows.

To update WSL if you have it, run this command in PowerShell:

wsl --update

To see which Linux systems you have, run:

wsl -l -v

If you don’t have Debian, install it:

wsl --install -d Debian

(Optional) To remove a Linux system you don’t need:

wsl --unregister Ubuntu-20.04

Inside your Debian terminal, install and set up Git:

sudo apt update && sudo apt upgrade -y
sudo apt install git
git config --global user.name "Twoje Imię"
git config --global user.email "twoj.email@example.com"
git config --global credential.helper cache

Install Docker Desktop

Docker Desktop is an app that helps you build and run applications in containers.

Download it from www.docker.com/products/docker-desktop/.

After installing, go to  Settings -> Resources -> WSL Integration  and make sure the switch for Debian is turned on.

Workflow

This is the standard process for working on any project.

  1. Open  Windows Terminal  to launch the  Debian WSL  shell. It’s best to have a projects directory in your home folder (~) to keep all your work organized. This is where you will use Git and Docker (the docker command will interact with Docker Desktop).
  2. In the ~/projects directory, clone your repositories and run Git commands.
  3. If needed, create a .env file for the project.
  4. If needed, start the project’s containers (e.g., with docker compose up -d).
  5. In  VS Code , connect to either  WSL  or a  container , depending on your needs. Connecting to a container allows you to edit code inside of it (this makes sense for projects using bind mounts) and gives your IntelliSense access to dependencies that are only installed inside the container (which is the recommended setup).