Thursday, January 11, 2018

DNF (Fork of YUM) Command To Manage Packages on Fedora System

We are working as a LINUX Server/System administrator but most of us
don’t know about DNF command and its feature. In this article we are
going to explain about DNF and its usage. DNF stands for Dandified yum.
We can tell DNF, the next generation of yum package manager (Fork of
Yum) using hawkey/libsolv library for backend. Aleš Kozumplík started
working on DNF since Fedora 18 and its implemented/launched in Fedora 22
finally.
Now, we are going to play on our Fedora 22 box to explain and cover mostly used DNF commands with examples.Reference link

2) Install a Package or packages

Use the below command to install any package or packages on your
system. In this case i’m going to install apache, MariaDB-server,
MariaDB-client. Every time DNF ask your confirmation to install the
corresponding package. if you want to avoid the confirmation you can do
by this adding -y option with dnf.

9) Check package information

If you want to know the package detailed information before
proceeding with the installation. Use the below command, it will give
full information about the package like package version, size, repo
name, etc..

21) list available group packages

Use the below command to list available group of packages on your
system. In these groups no of packages are bundled together with a
single name. So you can install the group of packages with single shot
instead of installing each and every software separately.

22) Install the group of packages

To install group of packages use groupinstall instead of install
with yum command. In this case i’m going to install “Editors”. Its
bundled with lots package which was related with editors and supporting
packages.

26) Cleaning dnf cache

Whenever you are installing packages dnf creates a cache of metadata
and packages. This cache can take up a lot space. The dnf clean command
allows you to clean up these files. All the files dnf clean will act on
are normally stored in /var/cache/dnf.

29) Enable DNF Automatic

If you want to automate the updates on your system, you can do by installation dnf-automatic package. After installaing a pacakge, make sure you need to edit the /etc/dnf/automatic.con file and change apply_updates = yes insteadof apply_updates = no.