How To Install nethack on CentOS 8

nethack is A rogue-like single player dungeon exploration game

Introduction

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

What is nethack

NetHack is a single player dungeon exploration game that runs on a wide variety of computer systems, with a variety of graphical and text interfaces all using the same game engine. Unlike many other Dungeons & Dragons-inspired games, the emphasis in NetHack is on discovering the detail of the dungeon and not simply killing everything in sight - in fact, killing everything in sight is a good way to die quickly. Each game presents a different landscape - the random number generator provides an essentially unlimited number of variations of the dungeon and its denizens to be discovered by the player in one of a number of characters

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

Install nethack 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 nethack using dnf by running the following command:

sudo dnf -y install nethack

Install nethack 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 nethack using yum by running the following command:

sudo yum -y install nethack

How To Uninstall nethack on CentOS 8

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

sudo dnf remove nethack

nethack Package Contents on CentOS 8

/usr/bin/nethack
/usr/games/nethack
/usr/games/nethack/NetHack.ad
/usr/games/nethack/license
/usr/games/nethack/nethack
/usr/games/nethack/nhdat
/usr/games/nethack/pet_mark.xbm
/usr/games/nethack/pilemark.xbm
/usr/games/nethack/recover
/usr/games/nethack/rip.xpm
/usr/games/nethack/symbols
/usr/games/nethack/sysconf
/usr/games/nethack/x11tiles
/usr/lib/.build-id
/usr/lib/.build-id/88
/usr/lib/.build-id/88/7564c791af5e8015e447ddc93172dc9e48f7c7
/usr/lib/.build-id/ea
/usr/lib/.build-id/ea/0393d1e7ddc00a149683f5f18fb706ae7557b0
/usr/share/applications/nethack.desktop
/usr/share/doc/nethack
/usr/share/doc/nethack/Guidebook.txt
/usr/share/doc/nethack/README
/usr/share/doc/nethack/dgn_comp.txt
/usr/share/doc/nethack/dlb.txt
/usr/share/doc/nethack/history
/usr/share/doc/nethack/lev_comp.txt
/usr/share/doc/nethack/license
/usr/share/doc/nethack/makedefs.txt
/usr/share/doc/nethack/mn.txt
/usr/share/doc/nethack/mnh.txt
/usr/share/doc/nethack/nethack.txt
/usr/share/doc/nethack/opthelp
/usr/share/doc/nethack/recover.txt
/usr/share/doc/nethack/wizhelp
/usr/share/man/man6/dgn_comp.6.gz
/usr/share/man/man6/dlb.6.gz
/usr/share/man/man6/lev_comp.6.gz
/usr/share/man/man6/makedefs.6.gz
/usr/share/man/man6/nethack.6.gz
/usr/share/man/man6/recover.6.gz
/usr/share/pixmaps/nethack.xpm
/var/games/nethack
/var/games/nethack/logfile
/var/games/nethack/perm
/var/games/nethack/record
/var/games/nethack/save
/var/games/nethack/xlogfile

References

Summary

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