Reading Manpages in Emacs

You can read Unix online documentation (called manpages) from within Emacs by typing M-x man or by selecting Man from the Help menu.[6] This command creates a buffer with a formatted manpage in it, which you can scroll through (or copy from) using Emacs commands. Simply type: M-x man Enter Unix-command-name Enter.

For the Unix command name, you can use either a simple name, like ls, or a manpage section name like ttytab(5).

The advantage of using the man command is that you can scroll through the manpage easier than you can in some terminal applications or shell windows. Also, if you try to view manpages in shell mode, they may come out garbled if the settings aren't right, whereas man gives you clean text.

[6] This feature works on Linux, but not on Windows. To make it work on Mac OS X, set shell-file-name to /bin/sh.

Get Learning GNU Emacs, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.