How to install man pages on centos?
In order to use the man command, you must also install the man
package before or after the man-pages
one
# yum install man-pages
... ok
# yum install man
... ok
Now man
is installed
# man ls
NAME
ls - list directory contents
SYNOPSIS
ls [OPTION]... [FILE]...
DESCRIPTION
List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor --sort.
Mandatory arguments to long options are mandatory for short options too. ...
I had the same problem in my docker container and solved it by commenting out tsflags=nodocs
in the /etc/yum.conf
file, then I removed the man-pages and man-db and reinstall them again. It works fine this way.
$ vi /etc/yum.conf
Search for tsflags
into the file and add a comment (#) in front of it:
#tsflags=nodocs
Now remove the man-db and the man-pages if it's already installed on your system:
$ yum remove man-pages man-db
Then install them again:
$ yum install man-pages man-db
Sorted!
The syntax on CentOS 7:
# yum install man-pages man-db man
The syntax on CentOS 6:
$ sudo yum install man man-pages
Source