Help and documentation
Table of contents
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
Navigation in man
The man pages use less as the pager:
| Key | Action |
|---|---|
Space | Next page |
b | Previous page |
/text | Search |
n | Next occurrence |
q | Quit |
h | Help |
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
| Section | Content |
|---|---|
| NAME | Name and short description |
| SYNOPSIS | Usage syntax |
| DESCRIPTION | Detailed description |
| OPTIONS | List of options |
| EXAMPLES | Usage examples |
| FILES | Associated files |
| SEE ALSO | Related commands |
| BUGS | Known bugs |
| AUTHOR | Author(s) |
Manual sections
The man pages are organized into sections:
| Section | Content |
|---|---|
| 1 | User commands |
| 2 | System calls |
| 3 | Library functions |
| 4 | Special files |
| 5 | File formats |
| 6 | Games |
| 7 | Miscellaneous |
| 8 | Administration 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
| Aspect | man | --help |
|---|---|---|
| Detail | Complete | Summary |
| Navigation | Paginated (less) | Displayed at once |
| Examples | Often present | Rarely |
| Speed | Slower | Faster |
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?
| Situation | Use |
|---|---|
| Quick reminder of options | --help |
| Understand in detail | man |
| Search for a command | man -k |
| Usage examples | man |
🔝 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
Navigation in info
| Key | Action |
|---|---|
Space | Next page |
Backspace | Previous page |
Tab | Next link |
Enter | Follow a link |
u | Go up one level |
n | Next node |
p | Previous node |
q | Quit |
? | 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
| Resource | URL | Content |
|---|---|---|
| Ubuntu Docs | docs.ubuntu.com | Official Ubuntu documentation |
| Debian Wiki | wiki.debian.org | Community Debian wiki |
| Arch Wiki | wiki.archlinux.org | Very comprehensive documentation |
| Linux.die.net | linux.die.net/man | Man pages online |
| TLDP | tldp.org | Linux 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
| Site | URL | Specialty |
|---|---|---|
| Stack Overflow | stackoverflow.com | Programming |
| Unix & Linux SE | unix.stackexchange.com | Linux/Unix questions |
| Ask Ubuntu | askubuntu.com | Ubuntu questions |
| Server Fault | serverfault.com | System administration |
| Reddit r/linux | reddit.com/r/linux | Linux community |
How to ask a good question
- Search first: your question probably already has an answer
- Be specific: describe exactly the problem
- Give the context: OS version, commands used
- Show what you have tried
- 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
| Type | Resources |
|---|---|
| Free courses | Linux Journey, Linuxize |
| Paid courses | Linux Foundation, A Cloud Guru |
| Videos | YouTube, Udemy |
| Books | "The Linux Command Line", "LPIC-1 Study Guide" |
Linux certifications
| Certification | Level | Vendor |
|---|---|---|
| Linux Essentials | Beginner | LPI |
| LPIC-1 | Intermediate | LPI |
| LPIC-2 | Advanced | LPI |
| RHCSA | Intermediate | Red Hat |
| RHCE | Advanced | Red Hat |
🔝 Back to table of contents
Key takeaways
man command= complete documentationcommand --help= quick helpman -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