Skip to content

WSL2 package management workflow

The fundamental workflow for managing software in the Windows Subsystem for Linux 2 (WSL2) environment relies on the standard Debian-based apt package manager^[600-developer__tools__windows__install-wslg.md].

Updating the System

Before installing new software, it is standard practice to update the local package index and upgrade existing installed packages. This ensures that the system has the latest information on available versions and that current software is up to date^[600-developer__tools__windows__install-wslg.md].

sudo apt update
sudo apt upgrade

Installing Packages

Once the system is updated, new packages can be installed using the sudo apt install command^[600-developer__tools__windows__install-wslg.md]. For example, to install the gedit text editor (common in GNOME desktop environments), the following command is used^[600-developer__tools__windows__install-wslg.md]:

sudo apt install gedit

Sources

  • 600-developer__tools__windows__install-wslg.md