←
Command Line
/
Guided Lab Get Help with help and --help
60:00
Click the virtual machine below to start practicing
>_ Tekhnikum | Lab
- Setting up virtual machine…
- Preparing lab files…
- Starting terminal services…
This lab machine has stopped
Your progress through the guide is saved. Start a fresh machine to keep practicing.
Introduction
Some commands are built into Bash itself (builtins, like cd and echo); most are separate programs (like ls). They have different help systems.
This lab is the hands-on companion to the help lesson from Linux Journey (CC BY-SA 4.0).
Help for Builtins
help documents Bash builtins:
help echo
help cd
A Program's Usage Summary
Most programs print a summary with --help. It's long, so page through it:
ls --help | less
What Is This Name?
type tells you whether a name is a builtin, an alias, or a program on disk:
type cd
type ls
type type
cd is a shell builtin
ls is aliased to `ls --color=auto'
Summary
help name documents Bash builtins.
program --help prints a program's usage summary.
type name shows what a name refers to.