How To Install nnn on CentOS 8

nnn is The missing terminal file browser for X

Introduction

In this tutorial we learn how to install nnn on CentOS 8.

What is nnn

nnn is probably the fastest and most resource-sensitive (with all its capabilities) file browser you have ever used. It’s extremely flexible too - integrates with your DE and favourite GUI utilities, works with the desktop opener, supports bookmarks, has smart navigation shortcuts, navigate-as-you-type mode, disk usage analyzer mode, comprehensive file details and much more. nnn was initially forked from noice but is significantly different today. Cool things you can do with nnn - open any file in the default desktop application or a custom one - navigate-as-you-type (search-as-you-type enabled even on directory switch) - check disk usage with number of files in current directory tree - run desktop search utility (gnome-search-tool or catfish) in any directory - copy absolute file paths to clipboard, spawn a terminal and use the paths - navigate instantly using shortcuts like ~, -, & or handy bookmarks - use cd ….. at chdir prompt to go to a parent directory - detailed file stats, media info, list and extract archives - pin a directory you may need to revisit and jump to it anytime - lock the current terminal after a specified idle time - change directory on exit

We can use yum or dnf to install nnn on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install nnn.

Install nnn on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install nnn using dnf by running the following command:

sudo dnf -y install nnn

Install nnn on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install nnn using yum by running the following command:

sudo yum -y install nnn

How To Uninstall nnn on CentOS 8

To uninstall only the nnn package we can use the following command:

sudo dnf remove nnn

nnn Package Contents on CentOS 8

/usr/bin/nnn
/usr/lib/.build-id
/usr/lib/.build-id/e0
/usr/lib/.build-id/e0/b22120ff411a94703934739016c499a65dd1ed
/usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/nnn-completion.bash
/usr/share/doc/nnn
/usr/share/doc/nnn/CHANGELOG
/usr/share/doc/nnn/README.md
/usr/share/fish/vendor_functions.d
/usr/share/fish/vendor_functions.d/nnn.fish
/usr/share/licenses/nnn
/usr/share/licenses/nnn/LICENSE
/usr/share/man/man1/nnn.1.gz
/usr/share/zsh/site-functions
/usr/share/zsh/site-functions/_nnn

References

Summary

In this tutorial we learn how to install nnn on CentOS 8 using yum and dnf.