hman command not found

In this troubleshooting guide we learn how to fix hman command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

hman: command not found

or when using sudo you get the following error message

sudo: hman: command not found

Solutions to hman: command not found

How To Fix hman: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu hman is provided by man2html package.

man2html is:

Point your web browser at http://localhost/cgi-bin/man/man2html to read and search your man pages in the browser.

This program needs a CGI-capable HTTP server. After installation it might be required to manually enable CGI support in the HTTP server (CGI may be disabled by default for the security consideration). For apache2, this can be done with the following:

$ sudo a2enmod cgid $ sudo systemctl restart apache2

Features:

  • Fast C CGI program for man/BSD-mandoc to HTML conversion.
  • Works from the unformatted nroff/troff source.
  • Source may be compressed.
  • Does tbl tables (but not eqn equations).
  • Generates hypertext links to foobar(1), abc@host, and xyzzy.h files
  • CGI script for whatis-based alpha-indexes by section.
  • CGI script for name-only alpha-indexes by section.
  • CGI script for full text search (requires swish++)
  • Front-end script to talk to a pre-launched netscape.

To fix this problem, we can install more using the command below.

sudo apt-get -y install man2html

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install man2html.

sudo apt -y install man2html

Or if you have aptitude installed you can use the following command.

sudo aptitude install man2html

Summary

In this tutorial we learn how to fix hman command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.