man

Gee I wish some of these programs had a manual so we can see some more information about them. Well luckily they do! Aptly named man pages, you can see the manuals for a command with the man command.

$ man ls

Man pages are manuals that are by default built into most Linux operating systems. They provide documentation about commands and other aspects of the system.

The page opens in the same pager you met in the less lesson, so the keys are the ones you already know: the arrow keys and Page Up and Page Down move around, /something searches, and q quits and gives you your prompt back. That last one is worth remembering now rather than discovering by trial: nothing else obviously gets you out.

Man pages are written for reference rather than for teaching, so they can be dense. The part most worth reading at first is the list of options partway down, which is where you find out what a flag such as -a or -l actually does.

Try it out on a few commands to get more information about them.

Exercise

Run man ls, scroll down to the list of options to find what -a and -l do, then press q to leave.

Quiz Question

How do you see the manuals for a command?

Show answer

man