Skip to main content Link Search Menu Expand Document (external link)

From the command line, application (packages) can be found, installed, upgraded and removed, among many other operations.

Locating Applications

  • In general, executable programs and scripts should live in /bin, /usr/bin, /sbin, /usr/sbin, or somewhere under /opt
  • Tools like which and whereis can be used to obtain the location.

Installing and Removing Software

The core parts of a Linux distribution and most of its add-on software are installed via the Package Management System.

Each package contains the files and other instructions needed to make one software component work well and cooperate with the other components that comprise the entire system

All linux distros have a low level and a high level package manager:

  • The low level, is in charge of installing single packages correctly.
  • The high level usually calls the low level one and additionally, is in charge of searching for dependencies

image

Basic commands can be found here

In Ubuntu (all Debian-based OS)

Low Level: dpkg

dpkg --list # List all packages 
dpkg --listfiles package # Lists files inside the package
sudo dpkg --remove package # Removes packages (checks for dependencies)

High Level : apt-get and apt-cache

In addition, ubuntu provides apt. This provides a high-level commandline interface for the package management system. It is intended as an end user interface and enables to easily use the most common options of apt-get and apt-cache. For more details see here

sudo apt-cache search package # Search for packages in the configured repositories
sudo apt-get install package # Installs the package (and dependencies)
sudo apt-get remove package # Removes the package (and dependencies)

Table of contents