Running Commands Commands have the following syntax: command options arguments Each item is separated by a space Options modify a command's behavior Single-letter options usually preceded by - Can be passed as -a -b -c or -abc Full-word options usually preceded by -- Example: --help Arguments are filenames or other data needed by the command Multiple commands can be separated by ;
Some Simple Commands date - display date and time cal - display calendar Getting Help Don't try to memorize everything! Many levels of help whatis command --help man and info /usr/share/doc/ Red Hat documentation
The whatis Command Displays short descriptions of commands Uses a database that is updated nightly Often not available immediately after install $ whatis cal cal (1) - displays a calendar
The --help Option Displays usage summary and argument list Used by most, but not all, commands $ date --help Usage: date [OPTION]... [+FORMAT] or: date [-u|-- utc|--universal] [MMDDhhmm[[CC]YY][.ss]] Display the current time in the given FORMAT, or set the system date....argument list omitted...
Reading Usage Summaries Printed by --help, man and others Used to describe the syntax of a command Arguments in  are optional Arguments in CAPS or <> are variables Text followed by... represents a list x|y|z means "x or y or z" -abc means "any mix of -a, -b or -c"
The man Command Provides documentation for commands Almost every command has a man "page" Pages are grouped into "chapters" Collectively referred to as the Linux Manual man [ ] Navigating man Pages While viewing a man page Navigate with arrows, PgUp, PgDn /text searches for text n/N goes to next/previous match q quits Searching the Manual man -k keyword lists all matching pages Uses whatis database
The info Command Similar to man, but often more in-depth Run info without args to list all page info pages are structured like a web site Each page is divided into "nodes" Links to nodes are preceded by * info [command] Navigating info Pages While viewing an info page Navigate with arrows, PgUp, PgDn Tab moves to next link Enter follows the selected link n/p /u goes to the next/previous/up-one node s text searches for text (default: last search) q quits info
Extended Documentation The /usr/share/doc directory Subdirectories for most installed packages Location of docs that do not fit elsewhere Example configuration files HTML/PDF/PS documentation License details Red Hat Documentation Available on Red Hat website Installation Guide Deployment Guide Virtualization Guide Knowledge base: Common questions and their solution