Search Apps & Packages in Repositories on Linux
☰ In this chapter, you will learn
- What are Repositories?
- How to find your desired apps onto repositories?
- How to list all the installed apps?
While working with Linux systems, the need to install various applications arises. At times, you might be familiar with the application's name, while in other instances, you may want to install specific apps that cater to your specific requirements.
This tutorial will guide you on discovering and installing desired apps from repositories by using keywords effectively.
What is Repositories?
The Repositories are the centralized storage system for storing and maintaining apps and software packages. It is same as "Windows - Microsoft Store", "Android - Play Store", or "iOS - APP Store".
These repositories are managed by the Operating System or Distribution and allow users to install, update, or remove software on their systems.
How to search packages inside repositories?
If you need to install specific software packages, your Linux distribution's package manager is a powerful tool for the task.
Ubuntu/Debian
The Debian-based system, such as Ubuntu, employs 'apt' and 'apt search' commands for efficient navigation within repositories. Here's an example:
Syntax:
sudo apt update
$apt search <keyword>
Example:
prashant@easycodelab:/$ apt search "firewall"
Sorting... Done Full Text Search... Done apf-firewall/focal 9.7+rev1-5.1 all easy iptables based firewall system arno-iptables-firewall/focal 2.1.0-1 all single- and multi-homed firewall script with DSL/ADSL support bittwist/focal 2.0-13 amd64 libpcap based Ethernet packet generator conntrackd/focal 1:1.4.5-2 amd64 Connection tracking daemon
Installation:
You can install the software package by using the sudo apt install <package_name>
.
sudo apt install apf-firewall
Red-Hat base Distribution
The Red-hat based system such as CentOS uses yum package manager for managing apps. Here's the example:
Syntax:
sudo yum search <keyword>
Example:
[root@easycodelab ~]# sudo yum search "firewall"
Last metadata expiration check: 0:00:49 ago on Thu 01 Feb 2024 04:50:52 PM IST. ================================= Name & Summary Matched: firewall ================================= firewall-applet.noarch : Firewall panel applet firewall-config.noarch : Firewall configuration application firewalld.noarch : A firewall daemon with D-Bus interface providing a dynamic firewall firewalld-filesystem.noarch : Firewalld directory layout and rpm macros python3-firewall.noarch : Python3 bindings for firewalld [root@easycodelab ~]#
Installation:
sudo yum install <package_name>
.sudo yum install firewalld
List the installed apps
There is a command in Linux that lists all the installed software packages. This command is particularly useful when you need to investigate the software packages currently installed on your Linux system.
Ubuntu
sudo apt list –installed
CentOS
sudo yum list installed
Summary:
In this tutorial, you have learned how to discover specific software packages within repositories and install them on your local system. This knowledge will assist you in navigating repositories effectively and locating the desired software packages.