apt: Installing Software
Update and install.
Installing software changes the whole system, so APT needs sudo. And there's always the same two step routine. Update the list, then install.

- It changes the system
- So it needs sudo
- Update, then install
Step one: update the list
Sudo APT update downloads the latest list of available packages from the repositories. It doesn't install anything yet. It just makes sure APT knows about the newest versions. The lines on your computer will look a little different.
sudo apt update Get:1 http://ports.ubuntu.com/ubuntu-ports noble InRelease [256 kB] Get:2 http://ports.ubuntu.com/ubuntu-ports noble-updates InRelease [126 kB] Get:3 http://ports.ubuntu.com/ubuntu-ports noble-backports InRelease [126 kB] Get:4 http://ports.ubuntu.com/ubuntu-ports noble-security InRelease [126 kB] Get:5 http://ports.ubuntu.com/ubuntu-ports noble/multiverse arm64 Packages [274 kB] Get:6 http://ports.ubuntu.com/ubuntu-ports noble/universe arm64 Packages [19.0 MB] Get:7 http://ports.ubuntu.com/ubuntu-ports noble/main arm64 Packages [1776 kB] Get:8 http://ports.ubuntu.com/ubuntu-ports noble/restricted arm64 Packages [113 kB] Get:9 http://ports.ubuntu.com/ubuntu-ports noble-updates/main arm64 Packages [1846 kB] Get:10 http://ports.ubuntu.com/ubuntu-ports noble-updates/multiverse arm64 Packages [107 kB] Get:11 http://ports.ubuntu.com/ubuntu-ports noble-updates/restricted arm64 Packages [3383 kB] Get:12 http://ports.ubuntu.com/ubuntu-ports noble-updates/universe arm64 Packages [2232 kB] Get:13 http://ports.ubuntu.com/ubuntu-ports noble-backports/universe arm64 Packages [36.3 kB] Get:14 http://ports.ubuntu.com/ubuntu-ports noble-backports/main arm64 Packages [49.0 kB] Get:15 http://ports.ubuntu.com/ubuntu-ports noble-backports/multiverse arm64 Packages [669 B] Get:16 http://ports.ubuntu.com/ubuntu-ports noble-security/restricted arm64 Packages [3157 kB] Get:17 http://ports.ubuntu.com/ubuntu-ports noble-security/universe arm64 Packages [1655 kB] Get:18 http://ports.ubuntu.com/ubuntu-ports noble-security/multiverse arm64 Packages [102 kB] Get:19 http://ports.ubuntu.com/ubuntu-ports noble-security/main arm64 Packages [1493 kB] Fetched 35.9 MB in 4s (8597 kB/s) Reading package lists... Done Building dependency tree... Done Reading state information... Done 2 packages can be upgraded. Run 'apt list --upgradable' to see them.
Step two: install
Now sudo APT install figlet. Figlet is a small fun program, that draws big letters. APT works out what's needed, downloads it, and sets it up. When it's done, the new command is ready to use, straight away. Figlet hello prints hello, in giant letters.
sudo apt install -y figlet Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: figlet 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. Need to get 130 kB of archives. After this operation, 745 kB of additional disk space will be used. Get:1 http://ports.ubuntu.com/ubuntu-ports noble/universe arm64 figlet arm64 2.2.5-3 [130 kB] Fetched 130 kB in 1s (156 kB/s) Selecting previously unselected package figlet. (Reading database ... 8228 files and directories currently installed.) Preparing to unpack .../figlet_2.2.5-3_arm64.deb ... Unpacking figlet (2.2.5-3) ... Setting up figlet (2.2.5-3) ... update-alternatives: using /usr/bin/figlet-figlet to provide /usr/bin/figlet (figlet) in auto mode Processing triggers for man-db (2.12.0-4build2) ... figlet hello _ _ _ | |__ ___| | | ___ | '_ \ / _ \ | |/ _ \ | | | | __/ | | (_) | |_| |_|\___|_|_|\___/
About dash Y
Normally, APT shows what it's going to install, and asks, do you want to continue? Y or N. Dash Y answers yes automatically. It's handy, but while you're learning, it's worth leaving it off, and reading what APT plans to do first.
| key | value |
|---|---|
| sudo apt update | refresh the list |
| sudo apt install x | install a package |
| -y | answer yes automatically |
| Without -y | read the plan first |
Summary
Sudo APT update refreshes the list, and sudo APT install installs a package. Next, searching for packages, and removing them.
Key takeaways- sudo apt update
- sudo apt install figlet
- Use it straight away