Skip to main content

Help and documentation


Table of contents

  1. The man pages
  2. The --help option
  3. The info command
  4. Online documentation
  5. Community and forums


1 - The man pages

man = manual

The man pages are Linux's built-in documentation. Almost every command has a man page.

Basic usage

# Afficher le manuel d'une commande
man ls
man cp
man grep

The man pages use less as the pager:

KeyAction
SpaceNext page
bPrevious page
/textSearch
nNext occurrence
qQuit
hHelp

Structure of a man page

LS(1)                    User Commands                    LS(1)

NAME
ls - list directory contents

SYNOPSIS
ls [OPTION]... [FILE]...

DESCRIPTION
List information about the FILEs...

OPTIONS
-a, --all
do not ignore entries starting with .
-l use a long listing format
...

EXAMPLES
ls -la
List all files in long format

SEE ALSO
dir(1), vdir(1)

Sections of a man page

SectionContent
NAMEName and short description
SYNOPSISUsage syntax
DESCRIPTIONDetailed description
OPTIONSList of options
EXAMPLESUsage examples
FILESAssociated files
SEE ALSORelated commands
BUGSKnown bugs
AUTHORAuthor(s)

Manual sections

The man pages are organized into sections:

SectionContent
1User commands
2System calls
3Library functions
4Special files
5File formats
6Games
7Miscellaneous
8Administration commands
# Accéder à une section spécifique
man 5 passwd # Format du fichier /etc/passwd
man 1 passwd # Commande passwd

# Voir toutes les sections disponibles
man -f passwd
# ou
whatis passwd

Searching in the manual

# Rechercher par mot-clé
man -k copy
man -k "list files"

# Équivalent avec apropos
apropos copy
apropos network
tip

man -k is very useful when you don't know the exact name of a command!

🔝 Back to table of contents



2 - The --help option

Almost every command accepts --help to display quick help.

Usage

# Aide rapide
ls --help
cp --help
grep --help

# Forme courte (parfois disponible)
ls -h

Difference from man

Aspectman--help
DetailCompleteSummary
NavigationPaginated (less)Displayed at once
ExamplesOften presentRarely
SpeedSlowerFaster

Example of --help output

$ mkdir --help
Usage: mkdir [OPTION]... DIRECTORY...
Create the DIRECTORY(ies), if they do not already exist.

Mandatory arguments to long options are mandatory for short options too.
-m, --mode=MODE set file mode (as in chmod), not a=rwx - umask
-p, --parents no error if existing, make parent directories as needed
-v, --verbose print a message for each created directory
--help display this help and exit
--version output version information and exit

When to use what?

SituationUse
Quick reminder of options--help
Understand in detailman
Search for a commandman -k
Usage examplesman

🔝 Back to table of contents



3 - The info command

info is an alternative documentation system, more structured than man.

Usage

info ls
info coreutils
info bash
KeyAction
SpaceNext page
BackspacePrevious page
TabNext link
EnterFollow a link
uGo up one level
nNext node
pPrevious node
qQuit
?Help

Characteristics

  • More detailed documentation than man
  • Hypertext format with links
  • Mainly for GNU tools
  • Hierarchical structure
note

info is used less than man on a daily basis. If the info page does not exist, info displays the man page instead.

🔝 Back to table of contents



4 - Online documentation

Official sites

ResourceURLContent
Ubuntu Docsdocs.ubuntu.comOfficial Ubuntu documentation
Debian Wikiwiki.debian.orgCommunity Debian wiki
Arch Wikiwiki.archlinux.orgVery comprehensive documentation
Linux.die.netlinux.die.net/manMan pages online
TLDPtldp.orgLinux Documentation Project

Arch Wiki - A reference

The Arch Wiki is an excellent resource, even if you don't use Arch Linux:

  • Very detailed documentation
  • Practical examples
  • Regularly updated
  • Applicable to all distributions
https://wiki.archlinux.org/

Explain commands

# Installer tldr (pages simplifiées)
sudo apt install tldr

# Utiliser tldr
tldr tar
tldr grep
tldr find

# Mise à jour de la base
tldr --update

tldr vs man

# man tar (très long et complexe)
man tar

# tldr tar (exemples pratiques)
tldr tar

Example of tldr output:

  tar

Archiving utility.
More information: https://www.gnu.org/software/tar

- Create an archive from files:
tar cf target.tar file1 file2 file3

- Create a gzipped archive:
tar czf target.tar.gz file1 file2 file3

- Extract an archive:
tar xf source.tar
tip

Install tldr! It's an ideal complement to man for quickly getting practical examples.

🔝 Back to table of contents



5 - Community and forums

Forums and Q&A

SiteURLSpecialty
Stack Overflowstackoverflow.comProgramming
Unix & Linux SEunix.stackexchange.comLinux/Unix questions
Ask Ubuntuaskubuntu.comUbuntu questions
Server Faultserverfault.comSystem administration
Reddit r/linuxreddit.com/r/linuxLinux community

How to ask a good question

  1. Search first: your question probably already has an answer
  2. Be specific: describe exactly the problem
  3. Give the context: OS version, commands used
  4. Show what you have tried
  5. Include the complete error messages

Question template

## Environnement
- OS : Ubuntu 22.04
- Version : Linux 5.15.0

## Problème
Je veux [objectif] mais j'obtiens [problème]

## Ce que j'ai essayé
1. Commande 1 : `xxx`
Résultat : ...
2. Commande 2 : `yyy`
Résultat : ...

## Message d'erreur

[message complet]

Learning resources

TypeResources
Free coursesLinux Journey, Linuxize
Paid coursesLinux Foundation, A Cloud Guru
VideosYouTube, Udemy
Books"The Linux Command Line", "LPIC-1 Study Guide"

Linux certifications

CertificationLevelVendor
Linux EssentialsBeginnerLPI
LPIC-1IntermediateLPI
LPIC-2AdvancedLPI
RHCSAIntermediateRed Hat
RHCEAdvancedRed Hat

🔝 Back to table of contents



Key takeaways

  • man command = complete documentation
  • command --help = quick help
  • man -k word = search for a command
  • Arch Wiki = excellent documentation for everyone
  • tldr = simplified practical examples
  • Stack Exchange = quality Q&A
  • Always search before asking

🔝 Back to table of contents


← Previous chapter | Next chapter: Review exercises →