How to Install a Software on Ubuntu | Package Management

Range

Package management facilities helps us to install and maintain software on the system. The package file for Ubuntu and other Debian based OS ends with .deb.
For eg. draw.io-amd64-12.2.2.deb

Package Files

A package file is a compressed collection of files necessary to install a software or an application. It also includes metadata about the package such as text description of package and name of dependencies the software needs.

Dependencies

To run a progam on a system, it rely on other programs. These other programs are called dependencies.

Repository

A repository is a collection of set of packages on a server. It can be accessed with package management tools like apt-get.

Package Management Tools

There are two types of package management tools in a package management system.

  1. Low-level tools for eg. dpkg
  2. High-level tools for eg. apt-get, aptitude


Difference between dpkg and apt-get

The dpkg tool is used to install and remove a package file. While installing if it encounters an unsatisfied dependency, it will unable to install the software or the application. It will simply list the missing dependencies. The Advanced Package Tool (APT), including apt and apt-get can automatically resolve these issues.

APT installs the latest package from an online source while dpkg installs from a package stored in our local system.

Commands

Finding a Package in a Repository

apt-cache search search_string
For eg. apt-cache search draw.io

Installing a Package from a Repository

apt-get install package_name
For eg. apt-get install draw.io

Installing a Package from a Package File

dpkg --install package_file
For eg. dpkg --install draw.io-amd64-12.2.2.deb

Removing a Package

apt-get remove package_name
For eg. apt-get remove draw.io


Updating Packages from a Repository

apt-get update; apt-get upgrade

Listing Installed Packages

dpkg --list

Determining if a Package is Installed

dpkg --status package_name
For eg. dpkg --status draw.io

Displaying Info About an Installed Package

apt-cache show package_name
For eg. apt-cache show draw.io

Get this post in pdf - How to install a Software on Ubuntu

Reference:
The Linux Command Line
https://www.oreilly.com/openbook/debian/book/appc_01.html
https://kali.training/topic/introduction-to-apt/
https://help.ubuntu.com/community/Repositories

You may also like

How to create Password list using CUPP tool on Ubuntu