How To Install Software Packages in 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
- Software repository: trusted central source of compiled, tested, integrated software
packages provided by a distribution. - 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. - 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
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.
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
yum install libpng12-dev