linux

How to install and remove software packages in Linux

The scope of today’s article is installing and removing certain software packages in Linux using both high and low level package management tools.
Installing software packages, including updates, is one of the most common tasks every system administrator performs. The main reason behind this is that Linux being an open source software, is constantly updated. New features are added and old bugs get fixed. Regular update of the used software also improves overall security.

Key Terms Used In This Article

  1. Software repository: trusted central source of compiled, tested, integrated software
    packages provided by a distribution.
  2. Low level package management: actions that pertain to an individual package: install,
    upgrade, query, remove. Does not handle dependency resolution: dpkg command in
    Debian-derived distributions, and rpm in distributions made up of rpms.
  3. High level package management: System level actions like system updates, accessing
    repository metadata, multiple package upgrades, and dependency resolution: apt in
    Debian-derived distributions, yum in rpm-based distributions

Real life task to fulfill

Install some software packages on Linux server using both low level and high level package management commands. In the examples below I am installing the libpng
ubuntu

How to install or remove a single package using apt-get

Apt- get is a high level package manager for Debian bases distributions like Ubuntu. You can use the command with proper parameters to install via terminal. To open a terminal you’d just press Ctrl+Alt+T on your keyboard to open. When it opens, you would run the apt- get to install the application.

When it opens, type the following code:
sudo apt-get install libpng12-dev

This one line of code will do all the work for you. It will download using wget the libpng package from the repository listed in sources.list in /etc/apt folder.
Centos

How to install or remove a single package using YUM

YUM command is run on a rpm- based distributions like Centos and RedHat.
It is run as yum .
In our case in order to install the libpng software, we should run:
yum install libpng12-dev


Leave a Reply

Your email address will not be published.

Related Posts

Linux System Administration

How to change ssh port

Advantages of Changing SSH Port First, I want to explain the reasons behind changing the ssh port of a server. Why changing ssh port when you have a strong password and/or a certificate? Additionally, it Read more…

Linux System Administration

SSH Hardening Techniques

SSH Hardening Techniques These are the top practices to harden ssh. In this article I am going to list the best and most important open ssh server security practices. SSH protocol is the best option Read more…

Linux System Administration

How To Use Public Key Authentication Instead Of Password

Password Login Belongs To The Past Public key authentication is an easier and more reliable compared to the old- fashioned password-based login. Keys are basically less prone to brute-force attacks. If you want to force Read more…