DNF command usage instruction

Source: Internet
Author: User

DNF command usage instruction

The next-generation RPM package manager of DNF. He first appeared in the ora 18 release. Recently, he replaced YUM and officially became the Package Manager of Fedora 22.

The DNF Package Manager overcomes some bottlenecks of the YUM Package Manager and improves the user experience, memory usage, dependency analysis, and running speed.

DNF uses the RPM, libsolv, and hawkey libraries for package management. Although it is not pre-installed in CentOS and RHEL 7, you can use DNF while using YUM.

The latest stable DNF release version is 1.0, and the release date is January 1, May 11, 2015. Most of the DNF package managers of this version (including all earlier versions) are written in Pathon and the release license is GPL v2.

-Install the DNF Package Manager.

DNF is not installed in RHEL or CentOS 7 by default, but DNF is used by default in Fedora 22.

1. To install DNF, you must first install and enable epel-release dependencies.

Run the following command in the system:

# Yum install epel-release

Or

# Yum install epel-release-y

In fact, there is no reason to force "-y". On the contrary, if "-y" is not used, you can check whether something has been installed into the system during the installation process. However, if you do not have this requirement, you can use the "-y" parameter in YUM to automatically install everything.

2. Use the YUM command in the epel-release dependency to install the DNF package. ,

Run the following command in the system: # yum install dnf

Then, the DNF Package Manager is successfully installed in your system. Next, it's time to start our tutorial! In this tutorial, you will learn 27 commands for DNF Package Manager. With these commands, you can easily and effectively manage the RPM software packages in your system. Now, let's start learning 27 Common commands of the DNF Package Manager!

-View the DNF Package Manager version.

Usage: this command is used to view the version of the DNF Package Manager installed on your system.

Command: # dnf-version

-View available DNF software libraries in the system

Usage: this command is used to display available DNF software libraries in the system.

Command: # dnf repolist

-View All DNF software libraries available and unavailable in the system

Usage: this command is used to display all DNF software libraries available and unavailable in the system.

Command: # dnf repolist all

-List all RPM packages

Usage: this command is used to list all available software packages from the software library and all software packages installed on the system.

Command: # dnf list

-List all installed RPM packages

Usage: this command is used to list all installed RPM packages.

Command: # dnf list installed

-List all available RPM packages

Use: this command is used to list available software packages from all available software libraries.

Command: # dnf list available

-Search for RPM packages in the software library

Usage: if you do not know the exact name of the software you want to install, you can use this command to search for software packages. You need to enter a part of the software name after the "search" parameter to search. (In this example, we use "nano ")

Command: # dnf search nano

-Find the provider of a file

Usage: You can use this command to check which software package provides a file in the system. (In this example, we will look for the provider of the file "/bin/bash)

Command: # dnf provides/bin/bash

-View the software package details

Usage: This command helps you to view the details of a software package before installing it. (In this example, we will view the details of the "nano" package)

Command: # dnf info nano

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • 3
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.