16. man

In Linux, nearly every command comes with its own instruction manual. These are called "man pages" (short for manual pages), and they are an essential resource for learning how to use the system effectively.

Understanding Man Pages

Man pages are the built-in documentation for Linux commands, utilities, and system calls. They provide a detailed description of what a command does, its available options (or flags), and how to use it. They are your first and best source for command-line help.

Accessing a Manual with man

To view the manual for any command, you use the man command itself, followed by the name of the command you want to learn about. For example, to read the manual for the ls command, you would type:

man ls

This will open the ls man page, a comprehensive document detailing all of its features. You can scroll through the manual using the arrow keys and press q to quit and return to the command line.

Finding Details on Command Options

Man pages are particularly useful for understanding command options. For instance, if you've seen the ls -l command and want to know what the -l flag does or what each column in the output means, the man ls page provides a complete explanation. It's the definitive guide for any variations of a command, making it an indispensable tool.

Sign in to save your learning progress

Sign in

Exercises

Practice is key to mastering the command line. These hands-on labs will help you reinforce your skills with fundamental commands. After completing them, use the man command to explore each tool's full potential.

  1. Linux ls Command: Content Listing - Practice listing and analyzing file and directory contents, and then use man ls to discover more options.
  2. Linux pwd Command: Directory Displaying - Learn the pwd command to display your current directory, and explore its man page for details.
  3. Linux cd Command: Directory Changing - Master navigating your file system with cd, and use man cd to understand its various techniques.

These labs will help you apply core concepts in real scenarios and build confidence with essential Linux commands, preparing you to effectively use man to deepen your knowledge.

Quiz

How do you see the manual for a command? (Please answer using only the command name in lowercase English letters).