How to follow links in linux man pages?
Man pages date back to Unix First Edition. While hypertext had been invented, it was still in infancy; the web was two decades away, and the manual was an actual printed book, often with one command per page if they fit (that's why they were called pages).
The format used for manual pages has evolved somewhat since then, but most pages aren't really designed for hypertext, and the default man
program doesn't support it (it's just a plain text viewer, with hacks to support some basic formatting). There are however man page viewing programs that reconstruct some hyperlinks, mainly links to other man pages, which are traditionally written in the form man(1)
where man
is the name of the man page and 1
is the section number:
- tkman, a GUI man page viewer with hyperlinks
- WoMan (wiki, man comparsion, formerly), a man page browser for Emacs, supporting hyperlinks
- man2html, a man to HTML converter (plus a web browser to read the result)
You can browse the manual pages of several operating systems, converted to HTML by man2html
or similar tools, on a number of sites online, for example:
- CentOS
- Debian
- FreeBSD (and a bunch of other collections)
- macOS: archive from 10.9 Mavericks, recent version at unix.com, partial copy at ss64.com
- MINIX 3
- NetBSD
- OpenBSD
- Solaris 10, Solaris 11, other Solaris versions
- Ubuntu
- Unix 1st edition, Unix 6th edition, Unix 8th edition
Some time after man pages had become the established documentation format on unix and some time before the web was invented, the GNU project introduced the info documentation format, more advanced than man while sticking to simple markup designed for text terminals. The major innovation of info compared to man was to have multi-page documentation with hyperlinks to other pages. Info is still the prefered documentation format for GNU projects, though most Info pages are generated from a Texinfo source (or sometimes other formats) that can also generate HTML. When info documentation for a program exists, it's often the main manual, while the man pages only contain basic information about command line arguments.
First of all, it's not a link. It's just an underline. Man pages are just text documents with a little bit of simple formatting that a terminal can handle. The underline is just a highlight, there is no "link" involved.
The normal man
command is just a text formatter. In fact the man
command doesn't even display the text, man
just formats the information stored in the man page file[1] and sends the formatted output to another program (usually less
) that displays the formatted output to the screen. These display programs have no concept of links.
There are some special documentation readers that might be able to look at formatting like that and make an educated guess that such a highlight might indicate that there is a related man page that could be pulled up and create a link, but I don't know which ones do. Perhaps pinfo
?
If you want web like formatting with hyperlinks you can find almost any UNIX man page online with links added in. Try typing man [anything]
into google and you will almost certainly get one in the first couple hits.
In the case of your example, the visual highlighting is a clue that that is another program name that has it's own man page that you can easily pull up. Try man 1 top
. The 1 indicates the section of the man pages to look in. See this question for an explanation of the sections: What do the numbers in a man page mean?
[1] If you open the man
page file in a text editor, you will see the raw man
page that is not formatted for easy reading. The raw man
page is written in a markup language called troff
. For more information on troff
and how to write a man
page see: https://liw.fi/manpages/ .
This is very late reply but use w3mman. w3mman is the system’s manual pager by w3m.
https://linux.die.net/man/1/w3mman
You can try it by installing w3m package. I believe this package is registered in the software repositories of most of major Linux/UNIX distributions and Cygwin.