If you've migrated to Fedora Desktop or Server and want to get up to speed with the DNF package manager, Jack Wallen gives you the basics.
Are you a Fedora desktop or server user? If so, did you know that the distribution has migrated to a new package manager? That's right, instead of yum being the default command line tool for installing applications, the new kid in town is called DNF. DNF stands for Dandified Yum and was introduced way back in Fedora 18 and became the default in Fedora 22.
For those who have yet to try it (because yum still exists on the distribution and habits are hard to break), DNF automatically computes dependencies and determines the actions required to install packages. DNF also makes it easier to maintain groups of packages, eliminating the need to manually update each related package using rpm.
SEE: System update policy template download (Tech Pro Research)
How to use DNF
But how do you use DNF? It's actually very similar to that of YUM. Let's take a look at the basics of using DNF. The basic usage of DNF is dnf option package. Say you want to install rkhunter on your Fedora Server platform with DNF. To do this, issue the command sudo dnf install rkhunter. To remove the same package, issue the command sudo dnf remove rkhunter.
What if you want to update your Fedora Server installation? DNF allows you to do that as well. Issue the command sudo dnf update, and you're good to go.
DNF also allows you to easily install via groups. To find out what groups are available, issue the command sudo dnf group list. Find the group you want to install and issue the command sudo dnf group install GROUPNAME (Where GROUPNAME is the group to be installed). For example, installing the Web Server group can be accomplished with the command sudo dnf group install "Web Server".
Make sure to place multi-word group names in quotes, otherwise DNF will error out. And that's pretty much the gist of using DNF. There is quite a bit more to it, so issue the command man dnf to learn more. Happy package managing.
- New features in Fedora 29 make life easier for web developers (TechRepublic)
- How to install applications from the command line using apt, dnf, and zypper (TechRepublic)
- How to use the Linux screen command to keep your remote processes running (TechRepublic)
- How to find the right Linux distribution for you (TechRepublic)
- Fedora 29, hands-on: Installing and upgrading (ZDNet)
- It takes work to keep your data private online. These apps can help (CNET)
- Programming languages and developer career resources coverage (TechRepublic on Flipboard)