07. Installing packages with dependencies dnf

DNF Does Not stand For anything. It was created to solve longstanding problems with yum, such as dependency resolutions and interaction with online repositories. Furthermore, Yum's API is poorly documented, and after several bouts of poorly-managed refactoring, it has become difficult to keep the program slim and well-specified.

DNF has also improved on lower memory reduction and less automatic synchronization of metadata with respositories.

Actions

Here are five subcommands that you can use with dnf.

1) General

Here are some general commands about the dnf package itself.

--version
Check the version of DNF installed.
repolist
List all enabled repositories on your system. Add all at the end to view disabled repositories as well.
list
List all available packages on the repos and installed packages.

2) Searching

# dnf search vim
...
vim-minimal.x86_64 : A minimal version of the VIM editor
...

3) Query

To get information about a package

# dnf info vim
Name : vim-minimal Arch : x86_64 Epoch : 2 Version : 7.4.640 Release : 4.fc22 Size : 922 k Repo : @System Summary : A minimal version of the VIM editor URL : http://www.vim.org/ License : Vim Description : VIM (VIsual editor iMproved) is an updated and improved version of the : vi editor. Vi was the first real screen-based editor for UNIX, and is : still very popular. VIM improves on vi by adding new features: : multiple windows, multi-level undo, block highlighting and more. The : vim-minimal package includes a minimal version of VIM, which is : installed into /bin/vi for use when only the root partition is : present. NOTE: The online help is only available when the vim-common : package is installed. Available Packages Name : vim-minimal Arch : x86_64 Epoch : 2 Version : 7.4.827 Release : 1.fc22 Size : 465 k Repo : updates Summary : A minimal version of the VIM editor URL : http://www.vim.org/ License : Vim Description : VIM (VIsual editor iMproved) is an updated and improved version of the : vi editor. Vi was the first real screen-based editor for UNIX, and is : still very popular. VIM improves on vi by adding new features: : multiple windows, multi-level undo, block highlighting and more. The : vim-minimal package includes a minimal version of VIM, which is : installed into /bin/vi for use when only the root partition is : present. NOTE: The online help is only available when the vim-common : package is installed.

4) Installing

Instaling is similar to how it was done in yum.

# sudo dnf install vim-minimal

5) Upgrading/Updating

In dfn, upgrading and updating mean the same thing.

# Update just vim-minimal
# dnf update vim-minimal # Update all installed software
# dnf upgrade

Want to avoid becoming a code monkey?

Clean Code

Want to avoid becoming a code monkey? Try Good Practice

Software expert Robert C. Martin presents a revolutionary paradigm with Clean Code: A Handbook of Agile Software Craftsmanship. Martin has teamed up with his colleagues from Object Mentor to distill their best agile practice of cleaning code "on the fly" into a book that will instill within you the values of a software craftsman and make you a better programmer.

$ Check price
49.9949.99Amazon 4.5 logo(427+ reviews)

More Good Practice resources

Take your Linux skills to the next level!

Command Line Kung Fu

Take your Linux skills to the next level! Try Linux & UNIX

Command Line Kung Fu is packed with dozens of tips and practical real-world examples. You won't find theoretical examples in this book. The examples demonstrate how to solve actual problems. The tactics are easy to find, too. Each chapter covers a specific topic and groups related tips and examples together.

$ Check price
14.9914.99Amazon 4.5 logo(27+ reviews)

More Linux & UNIX resources

Ad