How to Install a Software on Ubuntu | Package Management
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
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.
To run a progam on a system, it rely on other programs. These other programs are called dependencies.
A repository is a collection of set of packages on a server. It can be accessed with package management tools like apt-get.
There are two types of package management tools in a package management system.
- Low-level tools for eg.
dpkg
- High-level tools for eg.
apt-get
,aptitude
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.
apt-cache search search_string
For eg. apt-cache search draw.io
apt-get install package_name
For eg. apt-get install draw.io
dpkg --install package_file
For eg. dpkg --install draw.io-amd64-12.2.2.deb
apt-get remove package_name
For eg. apt-get remove draw.io
apt-get update; apt-get upgrade
dpkg --list
dpkg --status package_name
For eg. dpkg --status draw.io
apt-cache show package_name
For eg. apt-cache show draw.io
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