How software reaches the system

Lesson 26 of 30 · Working with Linux

A package bundles software files with information such as its version and dependencies. A dependency is another component needed by the software. A repository is a configured source of packages and their metadata. A package manager can consult that metadata, propose dependencies, install files, track installed versions, and remove or update packages. The available versions and names depend on the configured sources and distribution.

On Debian or Ubuntu, including Ubuntu running inside WSL, APT is a common package-management tool. Fedora and Arch use different tools; do not assume an Ubuntu command applies to them. On macOS, Homebrew is an optional, separately installed package manager. A Windows application and a Linux package inside WSL are installed in different environments.

The following are illustrations for an authorized Ubuntu system, not commands required for this lesson:

apt --version
sudo apt update
sudo apt install neovim

The first reports the APT version. update refreshes package indexes; it does not upgrade installed packages. install requests Neovim and any needed dependencies, may download software and change system files, and normally asks for confirmation. sudo requests elevated privileges; use it only if authorized and you understand the command. Read the proposed package changes and cancel if they are unexpected. Network access and configured repositories are required.

If the package is already installed, nvim --version reports its version. command -v nvim shows how the current shell resolves that name. Failure may mean the program is not installed, the name differs, or its directory is absent from PATH; a package manager may not know about programs installed through another method. Follow the relevant distribution’s documentation for updates and removal rather than deleting managed files manually.