How to add/install man pages in Alpine Linux

last updated in Categories , ,

When I type the ‘man ls‘ command in Alpine Linux, I get an error message: bash: man: command not found. How do I install and use man pages in Alpine Linux?

The man command used to display the on-line manual pages on Alpine Linux. The man page(s) may not be installed to save disk space, especially on Linux containers. Here is the quick and easy command option to install man command and man pages in Alpine Linux.

How to get man pages working in Alpine Linux

Type the following apk command to install man pages:
# apk add man man-pages
Sample outputs:

Fig.01: Installing man pages in Alpine Linux with apk command
Fig.01: Installing man pages in Alpine Linux with apk command


To display man page use the following simple syntax:
man command
man {section} command-name

Each man page comes in sections. The table below shows the section numbers of the manual followed by the types of pages they contain:

  • Section # 1 : User command (executable programs or shell commands)
  • Section # 2 : System calls (functions provided by the kernel)
  • Section # 3 : Library calls (functions within program libraries)
  • Section # 4 : Special files (usually found in /dev)
  • Section # 5 : File formats and conventions eg /etc/passwd
  • Section # 6 : Games
  • Section # 7 : Miscellaneous (including macro packages and conventions),
  • Section # 8 : System administration commands (usually only for root user)
  • Section # 9 : Kernel routines [Non standard]

For example, to display ls command man page, enter:
$ man ls
$ man 5 passwd
See how to install man pages on a Ubuntu Linux.

This entry is 1 of 5 in the Installing and Using Man Pages Tutorial series. Keep reading the rest of the series:
  1. How to add/install man pages in Alpine Linux
  2. How to install man pages on a CentOS Linux 6/7
  3. Unix / Linux: Display Color Man Pages
  4. Linux / UNIX: Getting help with man pages and how to use them
  5. HowTo: Linux / UNIX Create a Manpage

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.