Dnf Red Hat

From Teknologisk videncenter
Jump to: navigation, search

Remember sudo

  • dnf search foo # Search for package containing foo in either name or short description
  • dnf list # List all installed packages
  • dnf list *lib* # List all files containing lib in its name
  • dnf install foo # Install the package named foo

Summary commands

Source:https://learning.oreilly.com/library/view/red-hat-rhcsa/9780138096311/ch09.xhtml#ch09lev1sec04

dnf groups

A group is a collection of packages which typically collects several packages needed by a service, simplifying installation.

To see main groups

dnf group list

To see additional groups

dnf group list hidden

Install a group - example

dnf groupinstall "TeX formatting system"

dnf modules

Modules allows you to access/install different versions of an application stream. An application stream is a specific version of a module - for example php version 8.1.

Only one application stream can be enables at any given time.

dnf module list
...
dnf module info php:8.1
...
 dnf module enable php:8.1
...
dnf module install php:8.2
dnf distro-sync


Articles