Skip to content

Lesson 2: Getting help

Manual pages

If at any point during this tutorial (or thereafter) you are unsure of a command, or it's options, the best place to start is with the command's manual page. If supported, you can see more information about a specific command using the man command.

Note

Even the man command has it's own manual page!

When you are using the man command, press space to scroll down a page, b to go back a page, or q to quit. You can also use the up and down arrows to scroll a line at a time. The man command is actually using another Linux program, a text viewer called less, which we'll come to later on.

Help options

If a manual page is not available, try running the command with the help option -h or --help. Many commands will display the Usage and Argument list when the help option is passed. E.g.

learner ~]$ mkdir --help
sage: mkdir [OPTION]... DIRECTORY...
reate the DIRECTORY(ies), if they do not already exist.

andatory 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
 -Z, --context=CTX  set the SELinux security context of each created
                     directory to CTX
     --help     display this help and exit
     --version  output version information and exit

Note

Remember: Google is your friend here!