APT package management in WSL¶
APT (Advanced Package Tool) is the primary command-line utility for package management on Debian-based Linux distributions, such as Ubuntu, which are commonly used within the Windows Subsystem for Linux (WSL). It is used to install, update, and remove software packages.^[600-developer-tools-windows-install-wslg.md]
Basic Commands¶
To manage software effectively, users typically utilize a set of core commands to refresh the package lists and upgrade installed software.
- Update package list: Before installing new software, it is standard practice to update the local list of available packages to ensure the latest versions are retrieved.
sudo apt update - Upgrade packages: This command installs newer versions of the packages you have installed.
sudo apt upgrade
Installing Software¶
The apt install command is used to add new software packages to the system.^[600-developer-tools-windows-install-wslg.md]
For example, to install gedit, which is the default text editor for the GNOME desktop environment, you would run:^[600-developer-tools-windows-install-wslg.md]
sudo apt install gedit
Related Concepts¶
- [[WSL]]
- [[Linux]]
- [[Package management]]