check if a program is installed

Find whether a command exists, where it is, and which package it came from.

shellpackages

steps
  1. command -v git

    its path, or nothing if it is not there (use this in scripts)

  2. type -a python3

    every python3 the shell can find, aliases and functions too

  3. git --version

    its version

  4. dpkg -l | grep NAME

    installed by apt? (Debian, Ubuntu)

  5. apt policy NAME

    installed and available versions

notes
  • lore shows every command it finds, and each page's VERSION says the package.
commands used

commandtypedpkgapt

Each has a page in lore: lore command opens it.