5 ways to install package in Linux

Package management is a crucial part of any Linux system. It allows you to easily install, update, remove, and search for software on your computer. There’s a lot of different package managers in use today, but we’re going to focus on two main ones: apt-get and yum. Both are popular in their own way, so it’s important that you know how they work before installing anything new onto your machine.

Package Management Systems

A Package Management System (PMS) is the tool used to install, configure and remove applications and libraries. A PMS may be a command line utility or an interface provided by a graphical user interface. There are many different types of package managers, depending on the operating system.

Installing on Debian-based systems

Installing packages using APT is really simple. Just type:

  • apt-get install packagename

You can also remove and upgrade packages as well:

  • apt-get remove packagename
  • apt-get update
  • apt-get upgrade

Installing on RPM-based systems

  • rpm -i package.rpm
  • rpm -Uvh package.rpm

Compiling from source

Compiling from source is a good way to learn the ins and outs of how your system works. It’s also useful for when you want to modify or customize an application or library.

To compile from source, you first need to download the source code from its repository on GitHub. Then, use your package manager to install the build dependencies (the other libraries and programs required for compiling). You can install most of these using sudo apt-get install (like sudo apt-get install build-essential), but some may require manual installation (see each package’s README file). Compile with make; then run make install to copy all necessary files into their appropriate directories. Finally, run make uninstall if you want to remove everything at once later on—but be careful: this will also remove any configuration changes you’ve made during development!


  • Checkinstall is a program that allows you to create packages for distribution. It’s used by developers to create packages for their programs, but it’s not intended for end users. However, if you know what you’re doing, checkinstall can be used as an alternative to Build Dependencies or Build Dependency Package Installer.
  • To install a package using checkinstall:
  • First, download the source code for your program and extract it into your home directory (or whatever folder on your system that contains all of your personal files).
  • Next, run “make”. If everything goes well, there should be at least one file named “pkg” in the main directory of the extracted folder. This pkg file will contain all of the information needed by checkinstall so that it knows exactly what version number needs to be included in each package created from this source code.
  • Now that we have everything set up properly with our source code and pkg file ready to go, run “checkinstall”. This will bring up an interface asking you several questions about how much information would like included in each package created by checkinstall (e.g., name vs version vs architecture). Enter all relevant info here before clicking OK; this step may take awhile depending on how many packages will be created based upon content within pkg file downloaded earlier when running make command above


In this article, we’ve discussed how to install packages on Linux. We’ve also looked at some of the more popular package management systems such as dpkg and rpm. We’ve covered how to install from source, when it might be useful, and what tools are available for doing so. Finally, we looked at checkinstall which allows you to create packages without having root access on your system by compiling them under a temporary directory instead of installing directly into /usr/local/bin for example.


Leave a Reply

Your email address will not be published. Required fields are marked *