Difference between revisions of "Dnf Red Hat"

From Teknologisk videncenter
Jump to: navigation, search
(Created page with "'''Remember sudo *dnf search foo # Search for package containing foo in either name or short description")
 
m
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
'''Remember [[sudo]]
 
'''Remember [[sudo]]
 
*dnf search foo  # Search for package containing foo in either name or short description
 
*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==
 +
[[Image:DNF summary.png|500px|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
 +
<source lang=bash>
 +
dnf group list
 +
</source>
 +
To see additional groups
 +
<source lang=bash>
 +
dnf group list hidden
 +
</source>
 +
Install a group - example
 +
<source lang=bash>
 +
dnf groupinstall "TeX formatting system"
 +
</source>
 +
==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.
 +
<source lang=bash>
 +
dnf module list
 +
...
 +
dnf module info php:8.1
 +
...
 +
dnf module enable php:8.1
 +
...
 +
dnf module install php:8.2
 +
dnf distro-sync
 +
</source>
 +
 +
 +
 +
==Articles==
 +
*[https://www.redhat.com/sysadmin/how-manage-packages DNF, YUM and/or RPM]
 +
 +
[[Category:Red Hat]][[category:Linux]]

Latest revision as of 10:44, 7 March 2024

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