Mission 2 of 5
Ubuntu Package Management Safely
Discover whether software is installed before considering a system change.
Search and inspect packages while keeping installation optional so the course remains removable.
Mental model
Understand what is happening
APT manages Ubuntu software.
Ubuntu and Debian use apt; Fedora uses dnf, Arch uses pacman, and openSUSE uses zypper. File and shell commands in this course work across them, but package commands do not.
Search/show/list are read-only.
Install/remove/purge use sudo and affect the real system outside ~/linux-practice.
Guided lab
Work through the mission
Read-only package search
Searches and inspects packages without installing anything.
apt search 'text editor' | head -20
apt show nano | head -20
apt list --installed | head -20Detect your package manager
Checks which common package-manager command is available without changing the system. Follow the APT examples only on Ubuntu, Debian, or their WSL distributions.
command -v apt || true
command -v dnf || true
command -v pacman || true
command -v zypper || trueInspect installed files
Uses dpkg to inspect installed package information.
dpkg -l | head -20
dpkg -l | grep -i bash
dpkg -L bash | head -20Optional install/remove pattern
This changes the real Ubuntu system. It is optional and not part of the removable sandbox guarantee.
sudo apt update
sudo apt install sl -y
sudo apt remove slCheckpoint
Verify the mission
Package inspection succeeds without an admin change.
Try it yourself
One step without a recipe
Use apt search file manager and apt show nautilus without installing anything.
Need a hint?
Before you install anything, run `apt show package-name`. It tells you what the package does, how big it is, and what else it pulls in. If the dependency list is huge, reconsider.
Explain it back
Before you move on
- Which APT actions are read-only?
- Why is package installation optional in this guide?