DEV Community

Aryan Vaishnani
Aryan Vaishnani

Posted on

Getting Help (man pages, info, --help)

Linux provides built-in help systems to learn commands, options, and usage.

The most common help methods are:

  1. man pages
  2. info pages
  3. --help option

1. man Pages

What is man?

man stands for manual pages.

It provides detailed documentation for Linux commands, system calls, configuration files, and utilities.

Basic Syntax

man command_name

Example:

man ls

This opens the manual page for the ls command.

Sections in man Pages

Section Description
NAME Command name and purpose
SYNOPSIS Command syntax
DESCRIPTION Detailed explanation
OPTIONS Available flags/options
EXAMPLES Usage examples
SEE ALSO Related commands

Important man Navigation Keys

Key Action
Arrow Up/Down Scroll
Space Next page
/word Search word
n Next search result
q Quit

Search man Pages

Search by Keyword

man -k network

Equivalent to:

apropos network

Short Description Only

whatis ls

2. info Pages

What is info?

info provides more detailed and structured documentation than man.

It supports:

  1. Navigation menus
  2. Hyperlink-like structure
  3. Detailed GNU documentation

Basic Syntax

info command_name

Example:

info bash

info ls   or   info pwd

Features of info

  1. Detailed explanations
  2. Node-based navigation
  3. Better for large documentation

Navigation Keys in info

Key Action
Arrow Keys Move
Enter Open node
u Go up
n Next node
p Previous node
q Quit

3. --help Option

Most Linux commands provide quick help using:

command --help

Example:

ls --help

Purpose of --help

Shows:

  1. Command syntax
  2. Options
  3. Short explanations

Advantages of --help

  1. Fast and simple
  2. No manual navigation needed
  3. Good for quick reference

Locate Command Documentation

whereis bash

View Command Path

which python

Top comments (0)