How to find out if the package is installed in Linux
Linux packages are just a collection of software and the way they are installed varies depending on the distribution. There are several ways to quickly check if a package is currently installed. Whether you are comfortable using the terminal or prefer a more intuitive approach, here is how you can check if the package is installed in Linux.
Use the package manager
Every Linux distribution includes a package manager. As the name suggests, this is the software you use to install or remove software packages. They also include commands that allow you to see if certain packages have been installed.
On Debian and Ubuntu distributions, you can check all installed packages with the following command:
apt list --installed
If you want to find a specific package, add the package name after the --installed flag . For example:
apt list --installed nano
If the package is installed, you will see a brief line with the package name and the version number installed. Packages that have not been installed will not appear.
You can also use dpkg to check installed packages by typing:
dpkg -s packagename
This command will give you a description of the package, including its version and capacity, but it will also show whether it is installed or not.
Arch Linux users can check with pacman, the Arch package manager. Open a terminal and enter:
pacman -Qs packagename
If using Fedora, you can find the same thing by using dnf and typing:
dnf list packagename
These commands will ask you to know the name of the package you're looking for, but certain package managers, like dnf, allow you to use wildcards like * to help search.
Use 'which' or 'has' on any Linux distribution
There are other ways to use the terminal and find out if the package is installed or not.Which command, for example, tells you the installation location of any package.
For example, if you search for sudo, it will display the location of sudo in '/ usr / bin / sudo'. To use it, enter:
which packagename
Replace packagename with the name of the package you want.
Alternatively, you can also use a third party solution called has.
You can install it directly on your Linux machine or. If you trust the script, run it directly from the Internet. You need to have curl installed to be able to do this. Open a terminal and enter:
curl -sL https://git.io/_has | bash -s packagename1 packagename2
You can check one or several packages at once. Just replace packagename with the name of the package you want.
Installed packages will have a green tick next to the version number. Uninstalled packages are displayed with a red cross.
Intuitive method to check installed packages
If you want to avoid the terminal, most Linux package managers come with a GUI replacement to perform the same task.
One of the best and works on many distributions, is GNOME Software. This tool will work with different package managers like apt or pacman and comes preloaded with Ubuntu.
GNOME has a simple GUI with the 'Installed' section, listing the software installed on the PC, although it does not list the packages.
If you need more detailed information, Debian and Ubuntu-based distributions can use the Synaptic Package Manager . This is a GUI wrapper for apt, which allows you to search and install packages, as well as view installed packages.
Installed packages will be displayed with a green checkbox next to the package name, as well as the package version, listed in the 'Installed Version' category.
You may need to install it first (this will involve opening the terminal), but the installation is very quick. Open a terminal and enter:
sudo apt install synaptic
Arch Linux users have many GUI wrappers for pacman, Arch's package manager, to choose from. You can learn more about these from the Arch Linux wiki.
Easily identify installed packages
One of the biggest benefits of Linux is the choice. You can go back to the package manager in the distro or use third-party solutions like finding out if the package has been installed.
If you are uncomfortable using a terminal, you can use your GUI to check for installed packages instead. Some of the best Linux distributions for beginners make it easy to completely avoid the terminal, thanks to their own GUI software installers like GNOME Software.
Which method do you like? Let everyone know in the comments below!
You should read it
- How to execute .run or .bin packages in Linux
- Decode how the package manager works and software installation on Linux
- Binary and Source Package: Which should be used?
- How to Install or Remove an RPM Package
- How to install Skye on Ubuntu
- How to manage packages on RPM-based Linux distributions with DNF
- What is Gentoo Linux? How to install?
- How to install Pip in Ubuntu
May be interested
- Everything you need to know about the DNF package managerdandified yum (dnf) is a powerful package management front-end for rpm-based linux distributions.
- 8 main differences between Windows and Linuxis linux and windows the same? linux is different from windows? that is the question that many people wonder when they first come into contact with the linux operating system. in this article we will help you answer that question.
- How is Arch Linux different from other Linux versions?arch linux is arguably the most misunderstood linux distribution. many people find arch difficult to install and maintain.
- How to find the MAC address using the command line in Linuxtoday, tipsmake.com will talk about an important command in linux, ip. this command works on all linux distributions, including ubuntu, arch linux, debian, fedora, etc. '
- What is UID in Linux? How to find and change the UIDif you've ever interacted with linux systems, chances are you've come across these two words, uid and gid. if you are not familiar with them, let's dig deeper through the following article.
- 14 interesting Linux commands in Terminalterminal is a very powerful tool, but it can become 'interesting' through a few bash commands that quantrimang will introduce to you later. let's follow up and find out because some commands are quite useful.
- Instructions for using find command in Linuxthe find command is one of the most important and handy commands on a linux system. as its name suggests, the command can find files on a linux pc based on a variety of conditions and variables you set.
- How to install Pip in Ubuntulinux has a lot of package managers. ubuntu not only has apt but also many programming languages that come with its own package manager. pip stands for python packages packages and allows you to easily install packages from python package index (pypi).
- How to install Skye on Ubuntuthere are actually several ways to install skype on linux. this article will show you how to install skype on ubuntu using the snap package or download directly from the microsoft website.
- Start Linux and Windows XP on the same machinewhen you turn on the device, if you want both linux and xp to boot together to choose to use, you can follow the instructions below. the test was done with ubuntu 7.04 (a version of linux) and windows xp service pack 2. in it, ubuntu was installed first, xp was installed later on a seagate 80 gb sata hard drive.