How To Install mandoc on CentOS 8

mandoc is A suite of tools for compiling mdoc and man

Introduction

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

What is mandoc

mandoc is a suite of tools compiling mdoc, the roff macro language of choice for BSD manual pages, and man, the predominant historical language for UNIX manuals. It is small, ISO C, ISC-licensed, and quite fast. The main component of the toolset is the mandoc utility program, based on the libmandoc validating compiler, to format output for UTF-8 and ASCII UNIX terminals, HTML 5, PostScript, and PDF.

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

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

sudo dnf -y install mandoc

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

sudo yum -y install mandoc

How To Uninstall mandoc on CentOS 8

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

sudo dnf remove mandoc

mandoc Package Contents on CentOS 8

/usr/bin/apropos
/usr/bin/apropos.mandoc
/usr/bin/demandoc
/usr/bin/man
/usr/bin/man.mandoc
/usr/bin/mandoc
/usr/bin/soelim
/usr/bin/soelim.mandoc
/usr/bin/whatis
/usr/bin/whatis.mandoc
/usr/lib/.build-id
/usr/lib/.build-id/97
/usr/lib/.build-id/97/b6d4bfd929d4e534c16ada4bfbb566ed6dd801
/usr/lib/.build-id/db
/usr/lib/.build-id/db/07da4ec5f9006a61bfd3abb35a17680c246acf
/usr/lib/.build-id/f7
/usr/lib/.build-id/f7/0f35f83db7604f53b2b96540830717dfa003fc
/usr/sbin/makewhatis
/usr/sbin/makewhatis.mandoc
/usr/share/licenses/mandoc
/usr/share/licenses/mandoc/LICENSE
/usr/share/man/man1/apropos.1.gz
/usr/share/man/man1/apropos.mandoc.1.gz
/usr/share/man/man1/demandoc.1.gz
/usr/share/man/man1/man.1.gz
/usr/share/man/man1/man.mandoc.1.gz
/usr/share/man/man1/mandoc.1.gz
/usr/share/man/man1/soelim.1.gz
/usr/share/man/man1/soelim.mandoc.1.gz
/usr/share/man/man1/whatis.1.gz
/usr/share/man/man1/whatis.mandoc.1.gz
/usr/share/man/man5/mandoc.conf.5.gz
/usr/share/man/man5/mandoc.db.5.gz
/usr/share/man/man7/eqn.7.gz
/usr/share/man/man7/eqn.mandoc.7.gz
/usr/share/man/man7/man.7.gz
/usr/share/man/man7/man.mandoc.7.gz
/usr/share/man/man7/mandoc_char.7.gz
/usr/share/man/man7/mdoc.7.gz
/usr/share/man/man7/roff.7.gz
/usr/share/man/man7/roff.mandoc.7.gz
/usr/share/man/man7/tbl.7.gz
/usr/share/man/man7/tbl.mandoc.7.gz
/usr/share/man/man8/makewhatis.8.gz
/usr/share/man/man8/makewhatis.mandoc.8.gz

References

Summary

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