Linux documentation in the Terminal: man and info
man and info are the main programs to get information about Linux/UNIX software without leaving your Terminal. Learn how to use them.
The content of these programs depends on the documentation files you have on your device. These docs are usually installed with every package, but in some Linux systems (like Alpine) you may need to download them manually by searching for
<package name>-doc (e.g.:
If it’s not already installed, you can install
man-db package, which includes
man. You can search a manpage by typing this simple command:
# an example: man ls
A manpage may have several sections. These sections are referred with a number inside a parenthesis (like
crontab(5)). You can go to a section by adding section number before manpage title:
man <section> <page>
Inside a manpage, you can use arrow keys to scroll, and q to exit. Press h to get more info about available commands.
You can show all the man page at once by specifying
cat as the pager:
man -P cat <page>
info works like
man but it usually includes more information about each program. In Debian/Ubuntu you can install it by typing
apt install info. In other distros, may be included in
# an example: info ls
coreutilsis install, you can type
info coreutilsand it will show a great guide for coreutils commands.
- Inside an info page, you can use arrow keys to scroll, u to go up one level, q to exit. Press Shift + h to get more info about available commands.
If you have any suggestion, feel free to contact me via social media or email.