← 返回命令列表

Linux command

dnf4 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Upgrade

sudo dnf4 upgrade

Search

dnf4 search [keyword1] [keyword2]

Example

dnf4 info [package]

Install

sudo dnf4 install [package1] [package2]

Remove

sudo dnf4 remove [package1] [package2]

Example

dnf4 list --installed

Example

dnf4 provides [command]

Example

dnf4 history

说明

dnf4 is the DNF version 4 package manager for RHEL 8/9 and older Fedora versions (pre-41). It's the successor to yum and manages RPM packages. On Fedora 41+, dnf defaults to version 5. Use dnf4 explicitly for the older version.

参数

upgrade
Upgrade installed packages
search _keywords_
Search package names and summaries
info _package_
Display package details
install _packages_
Install packages
remove _packages_
Remove packages
list
List packages
provides _file_
Find package owning file
history
View transaction history

FAQ

What is the dnf4 command used for?

dnf4 is the DNF version 4 package manager for RHEL 8/9 and older Fedora versions (pre-41). It's the successor to yum and manages RPM packages. On Fedora 41+, dnf defaults to version 5. Use dnf4 explicitly for the older version.

How do I run a basic dnf4 example?

Run `sudo dnf4 upgrade` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does upgrade do in dnf4?

Upgrade installed packages