Install software from the terminal
You do not have to download installers from random websites. This is Operating Systems from zero, episode six: package managers. Five steps to install and remove software, the safe way.
The app store for the terminal
Think of an app store for the terminal. The package list is the shop catalogue. Install downloads the program and sets it up. Remove tidies up afterwards. We will use one example on all three systems: a small tool called jq.
Step 1: refresh the list
Step one: refresh the list. On Ubuntu, sudo apt update downloads the latest catalogue. It reads the package lists, and tells you how many packages can be upgraded. On macOS, the package manager is Homebrew, and the command is brew update. On Windows, winget source update does the same.
Step 2: search
Step two: search. apt search jq finds packages that match the word. Each result shows the name, the version, and a short description. On macOS, use brew search. On Windows, use winget search.
Step 3: install
Step three: install. sudo apt install jq asks for confirmation, then downloads and sets up the program. Now jq --version prints jq-1.7.1. On macOS, use brew install jq. On Windows, use winget install jqlang.jq.
Step 4: list installed
Step four: see what is installed. apt list --installed shows every package on the system. Pipe it to grep jq to find just one. On macOS, use brew list. On Windows, use winget list.
Step 5: remove
Step five: remove. sudo apt remove jq takes the program off the system. On macOS, the command is brew uninstall jq. On Windows, winget uninstall jqlang.jq. Install only from sources you trust.
On Windows and macOS
On Windows PowerShell, winget searches, installs, lists and removes programs. The package id is jqlang.jq, and you use that id to install and to remove it. On macOS, Homebrew is not preinstalled. Install it from brew.sh first. Other Linux systems use their own tools, like dnf on Fedora, and pacman on Arch.
Recap
Recap. Refresh the list, search, install, list what you have, and remove. Three systems, one idea, and the same tool: jq.
Course complete
That is the end of Operating Systems from zero. You can now move around, manage files, run commands and install software. Find written notes for every lesson, free, at changecv.com/skills.