cheat-sheet-cover-linux-commands

RHEL 8 Cheat Sheet

Bob Reselman
English

About

dnf is an upgraded package manager that replaces the classic yum application in Red Hat Enterprise Linux (RHEL) 8. It brings increased performance, faster dependency resolution, and more complete documentation for its API.

This cheat sheet covers basic dnf commands and introduces the Subscription Manager and Application Streams features for developers in RHEL 8.

Subscription Manager keeps track of the various remote repositories that host application packages. It does the work of binding to a repository, so you don’t have to write code to do the binding. 

With Application Streams, you can run multiple versions of a program or module on a local machine. This lets you switch between different versions on demand without having to manage the details of upgrading or downgrading an application or module.

Download the RHEL 8 Cheat Sheet to learn useful commands for:

Working with the dnf package manager:

  • dnf search
  • dnf info
  • dnf install
  • dnf update
  • dnf remove
  • dnf history
  • dnf list
  • dnf repolist

Working with Subscription Manager:

  • subscription-manager repos

Working with Application Streams:

  • dnf module info
  • dnf module list
  • dnf module provides
  • dnf module enable
  • dnf module remove
  • dnf module disable
  • dnf module switch-to
  • dnf module reset

Installing popular modules, applications, and programming languages:

  • Ant
  • Buildah and Podman
  • llvm-toolset
  • Go
  • Apache HTTP
  • nginx
  • MariaDB
  • MySQL
  • Postgres
  • Apache Maven
  • Node.js
  • Java Development Kit
  • Perl
  • PHP
  • Python
  • Redis
  • Ruby
  • Rust
  • Scala
  • Simplified Wrapper and Interface Generator (SWIG)
  • SystemTap
  • Valgrind
  • Varnish

With Red Hat Developer cheat sheets, you get essential information right at your fingertips so you can work faster and smarter. Easily learn new technologies and coding concepts and quickly find the answers you need.

Excerpt

dnf install

dnf install [options] <module_name>

Installs a module on the local machine.

Example:

The following command installs the perl programming language on the local computer. The command uses the -y option to suppress the prompt that asks the user for permission to proceed:

sudo dnf install -y perl

The command produces too much screen output to show here.

dnf update

dnf update [options] <module_name>

Updates a module on the local machine.

Example:

The following command updates the perl programming language on the local computer. The command uses the -y option to suppress the prompt asking the user for permission to proceed:

$ sudo dnf update -y perl
Updating Subscription Management repositories.
Last metadata expiration check: 2:58:35 ago on Thu 27 Jan 2022 
08:48:07 AM PST.
Dependencies resolved.
Nothing to do.
Complete!

Related Cheat sheets