Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to determine if there is a software package in your Linux distribution

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to determine whether there is a software package in your Linux distribution, I believe most people do not know much about it, so share this article for your reference. I hope you will learn a lot after reading this article. Let's learn about it together.

Sometimes you may want to know how to find a specific package on your Linux distribution. Or you just want to know what version of the package is installed on your Linux. If that's what you want to know, it's your lucky day. I happen to know a gadget that can help you catch the above information, here is a grand recommendation-Whohas: this is a command-line tool that can query several software package lists at a time to check if your package exists. Currently, whohas supports Arch, Debian, Fedora, Gentoo, Mandriva, openSUSE, Slackware, Source Mage, Ubuntu, FreeBSD, NetBSD, OpenBSD, Fink, MacPorts and Cygwin. With this gadget, package maintainers can easily find package definition files like ebuilds, pkgbuilds, and so on from other Linux distributions.

Whohas is a free, open source tool developed in the Perl language.

Look for a specific package installation Whohas in your Linux

Whohas is available in the default software repositories of Debian, Ubuntu, and Linux Mint. If you are using some kind of DEB-based system, you can install it with the following command:

$sudo apt-get install whohas

For Arch-based systems, whohas is available in AUR. You can install it using any AUR helper program.

Use Packer:

$packer-S whohas

Or use Trizen:

$trizen-S whohas

Use Yay:

$yay-S whohas

Use Yaourt:

$yaourt-S whohas

On other Linux distributions, download the source code here and compile and install it manually.

Usage

The main goal of Whohas is to let you know:

Which Linux distribution provides packages that users rely on.

For each Linux distribution, what version of the package is specified, or what version of the package is specified on different versions of the Linux distribution.

Let's try the above features, for example, which Linux distribution has vim software? We can run the following command:

$whohas vim

This command will display information about all Linux distributions that contain installable vim, including package size, warehouse address, and download URL.

You can even pipe the output by alphabetically sorting the distribution, simply by adding the sort command.

$whohas vim | sort

Note that the above command will display all packages that start with vim, including vim-spell, vimcommander, vimpager, and so on. You can continue to use Linux's grep command to narrow your search by adding spaces before and after "vim" until you are satisfied.

$whohas vim | sort | grep "vim" $whohas vim | sort | grep "vim" $whohas vim | sort | grep "vim"

All searches with spaces in front of the package name will display the package that ends with the package name. All searches that place spaces after the package name will display the package that begins with the package name. Spaces before and after will be a strict match.

Or, you can use-- strict to strictly limit the results.

$whohas-strict vim

Sometimes you wonder if a package is in a particular Linux distribution. For example, if you want to know if vim is in Arch Linux, run:

$whohas vim | grep "^ Arch"

(LCTT translation note: search the results for Linux that begins with Arch)

Linux distributions are abbreviated as' archlinux', 'cygwin',' debian', 'fedora',' fink', 'freebsd',' gentoo', 'mandriva',' macports', 'netbsd',' openbsd', 'opensuse',' slackware', 'sourcemage' and' ubuntu'.

You can also use the-d option to get the same result.

$whohas-d archlinux vim

This command will search for the vim package under the Arch Linux distribution only.

If you want to search under multiple Linux distributions, such as' archlinux', 'ubuntu', use the following command.

$whohas-d archlinux,ubuntu vim

You can even use whohas to find out which distribution has whohas packages.

$whohas whohas

Please refer to the manual for more detailed information.

$man whohas

Of course, any Linux distribution package manager can easily find their own managed packages in the corresponding software repository. However, whohas helps you integrate and compare software packages specified under different Linux distributions so that you can easily compare them across platforms.

The above is all the contents of the article "how to determine if there is a software package in your Linux distribution". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report