Encontrar software com DNF


O comando dnf help exibe informações de uso. O comando dnf list exibe os pacotes instalados e disponíveis.

[user@host ~]$ dnf list 'http*'
Available Packages
http-parser.i686               2.9.4-6.el9    rhel-9.0-for-x86_64-appstream-rpms
http-parser.x86_64             2.9.4-6.el9    rhel-9.0-for-x86_64-appstream-rpms
httpcomponents-client.noarch   4.5.13-2.el9   rhel-9.0-for-x86_64-appstream-rpms
httpcomponents-core.noarch     4.4.13-6.el9   rhel-9.0-for-x86_64-appstream-rpms
httpd.x86_64                   2.4.51-5.el9   rhel-9.0-for-x86_64-appstream-rpms
httpd-devel.x86_64             2.4.51-5.el9   rhel-9.0-for-x86_64-appstream-rpms
httpd-filesystem.noarch        2.4.51-5.el9   rhel-9.0-for-x86_64-appstream-rpms
httpd-manual.noarch            2.4.51-5.el9   rhel-9.0-for-x86_64-appstream-rpms
httpd-tools.x86_64             2.4.51-5.el9   rhel-9.0-for-x86_64-appstream-rpms

O comando dnf search KEYWORD lista pacotes por palavras-chave encontradas somente nos campos de nome e sumário. Para procurar pacotes com “servidor Web” nos campos de nome, sumário e descrição, use search all:

[user@host ~]$ dnf search all 'web server'
================== Summary & Description Matched: web server ===================
nginx.x86_64 : A high performance web server and reverse proxy server
pcp-pmda-weblog.x86_64 : Performance Co-Pilot (PCP) metrics from web server logs
========================= Summary Matched: web server ==========================
libcurl.x86_64 : A library for getting files from web servers
libcurl.i686 : A library for getting files from web servers
======================= Description Matched: web server ========================
freeradius.x86_64 : High-performance and highly configurable free RADIUS server
git-instaweb.noarch : Repository browser in gitweb
http-parser.i686 : HTTP request/response parser for C
http-parser.x86_64 : HTTP request/response parser for C
httpd.x86_64 : Apache HTTP Server
mod_auth_openidc.x86_64 : OpenID Connect auth module for Apache HTTP Server
mod_jk.x86_64 : Tomcat mod_jk connector for Apache
mod_security.x86_64 : Security module for the Apache HTTP Server
varnish.i686 : High-performance HTTP accelerator
varnish.x86_64 : High-performance HTTP accelerator
...output omitted...

O comando dnf info PACKAGENAME fornece informações detalhadas sobre um pacote, incluindo o espaço em disco necessário para a instalação. Por exemplo, o comando a seguir recupera informações sobre o pacote httpd:

[user@host ~]$ dnf info httpd
Available Packages
Name         : httpd
Version      : 2.4.51
Release      : 5.el9
Architecture : x86_64
Size         : 1.5 M
Source       : httpd-2.4.51-5.el9.src.rpm
Repository   : rhel-9.0-for-x86_64-appstream-rpms
Summary      : Apache HTTP Server
URL          : https://httpd.apache.org/
License      : ASL 2.0
Description  : The Apache HTTP Server is a powerful, efficient, and extensible
             : web server.

O comando dnf provides PATHNAME exibe os pacotes correspondentes ao nome do caminho especificado (os nomes de caminho muitas vezes incluem caracteres curinga). Por exemplo, o comando a seguir encontra pacotes que fornecem o diretório /var/www/html:

[user@host ~]$ dnf provides /var/www/html
httpd-filesystem-2.4.51-5.el9.noarch : The basic directory layout for the Apache HTTP Server
Repo        : rhel-9.0-for-x86_64-appstream-rpms
Matched from:
Filename    : /var/www/html

Referências