How to install man pages on Ubuntu Linux

I installed the minimal Ubuntu Linux 20.04 LTS cloud server, and now man pages are missing from my image. How do I install man pages on Ubuntu Linux 16.04/18.04/20.04 LTS server?

Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements Ubuntu Linux
Est. reading time 4 minutes
Typically man pages for Ubuntu commands not installed on a minimal cloud server or container-based images. To save hard disk space and to keep container image rebuild time smaller, man pages not installed. But, fear not this page explains how to install man pages on Ubuntu Linux version 16.04/18.04/20.04 LTS using the apt command/apt-get command.

How to install man pages on Ubuntu Linux

You will see an error as follows when the man command and related files are not installed Ubuntu:
man useradd
-bash: man: command not found

First, you must run the following commands as the root user using the sudo command or su command. For example,
sudo -i
## OR ##
su -

Search for Ubuntu man pages

Use any one of the following command:
apt search manpages
apt search manpages | more
apt-cache search manpages
apt search man | grep -i db

We can filter out outputs using the grep command/egrep command:
apt-cache search manpages | egrep 'manpages-(dev|posix)'

manpages-dev - Manual pages about using GNU/Linux for development
manpages-posix - Manual pages about using POSIX system
manpages-posix-dev - Manual pages about using a POSIX system for development

Let us see what these pages do:
apt info manpages-posix
apt info manpages-dev
apt info man-db

Package: man-db
Version: 2.9.1-1
Priority: standard
Section: doc
Origin: Ubuntu
Maintainer: Colin Watson <>
Installed-Size: 2884 kB
Provides: man, man-browser
Pre-Depends: dpkg (>= 1.16.1~)
Depends: bsdmainutils, debconf (>= 1.2.0) | debconf-2.0, groff-base (>=, libc6 (>= 2.28), libgdbm6 (>= 1.16), libpipeline1 (>= 1.5.0), libseccomp2 (>= 2.1.0), zlib1g (>= 1:1.1.4)
Suggests: apparmor, groff, less, www-browser
Conflicts: man
Breaks: manpages-tr (<<, manpages-zh (<< 1.5.2-1.1)
Replaces: man, manpages-de (<< 0.5-4), manpages-tr (<<, manpages-zh (<< 1.5.2-1.1), nlsutils
Task: standard
Download-Size: 1112 kB
APT-Sources: focal/main amd64 Packages
Description: tools for reading manual pages
 This package provides the man command, the primary way of examining the
 system help files (manual pages). Other utilities provided include the
 whatis and apropos commands for searching the manual page database, the
 manpath utility for determining the manual page search path, and the
 maintenance utilities mandb, catman and zsoelim. man-db uses the groff
 suite of programs to format and display the manual pages.

Installing man pages on server or desktop Linux

First update package index and then install manpages-posix package for all missing commands:
sudo apt update
sudo apt install man-db manpages-posix

Install man pages on Ubuntu Linux using the apt-get command

Install man pages for software development

Execute the following command:
sudo apt install manpages-dev manpages-posix-dev
Sample outputs:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  manpages-dev manpages-posix-dev
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 4059 kB of archives.
After this operation, 6260 kB of additional disk space will be used.
Get:1 focal/multiverse amd64 manpages-posix-dev all 2013a-2 [1794 kB]
Get:2 focal/main amd64 manpages-dev all 5.05-1 [2266 kB]
Fetched 4059 kB in 1s (3352 kB/s)      
Selecting previously unselected package manpages-posix-dev.
(Reading database ... 18489 files and directories currently installed.)
Preparing to unpack .../manpages-posix-dev_2013a-2_all.deb ...
Unpacking manpages-posix-dev (2013a-2) ...
Selecting previously unselected package manpages-dev.
Preparing to unpack .../manpages-dev_5.05-1_all.deb ...
Unpacking manpages-dev (5.05-1) ...
Setting up manpages-dev (5.05-1) ...
Setting up manpages-posix-dev (2013a-2) ...
Processing triggers for man-db (2.9.1-1) ...

How do I read man page for any command?

The syntax is:
man command
man [section] command

For example, to read man page of the ls command:
man ls
man 8 passwd
man 5 passwd

man 5 passwd

Table 1: The section numbers of the manual pages are as follows
Man page section Description Examples
1 Executable programs or shell commands man cat
man 1 date

2 System calls (functions provided by the kernel) man 2 sendmsg

3 Library calls (functions within program libraries) man 3 abort

4 Special files (usually found in /dev) man 4 intel
man 4 amdgpu

5 File formats and conventions eg /etc/passwd man 5 shadow

6 Games man 6 gti
man 6 sl

7 Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7) man 7 inode

8 System administration commands (usually only for root) man 8 ip

9 Kernel routines [Non standard] man 9 vmxnet


In this tutorial, you learned how to install man-db and manpages-posix packages for Ubuntu Linux system using the apt command. See man command man page here for more info or by typing the following man command:
man 1 man
man 7 man

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 3 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
3 comments… add one
  • Ignacio Sep 5, 2020 @ 13:16

    Thank you!! It work for me, I couldn’t see man pages of system calls and functions.

  • C Seddon Apr 17, 2021 @ 14:09

    very helpful.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum