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

Take your Linux skills to the next level!

How Linux Works

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

In this completely revised second edition of the perennial best seller How Linux Works, author Brian Ward makes the concepts behind Linux internals accessible to anyone curious about the inner workings of the operating system. Inside, you'll find the kind of knowledge that normally comes from years of experience doing things the hard way.

$ Check price
39.9539.95Amazon 5 logo(114+ reviews)

More Linux & UNIX resources

Want to avoid becoming a code monkey?

Code Complete 2

Want to avoid becoming a code monkey? Try Good Practice

This book synthesizes the most effective techniques and must-know principles into clear, pragmatic guidance. No matter what your experience level, development environment, or project size, this book will inform and stimulate your thinking - and help you build the highest quality code.

$ Check price
54.9954.99Amazon 4.5 logo(291+ reviews)

More Good Practice resources

Ad