Linux Training : 12. help

Linux help commands.

Online, built-in help is available for (nearly) every command in /sbin, /bin, /usr/bin and /usr/sbin

  • man

    man is short for manual pages. Running man foo will display the manual pages for the command foo (if they exist). The man pages are an excellent way to recall the particular flags used for different commands. For example, the ls command is a commonly used command with more flags under the hood.
    man ls
    
    LS(1)                            User Commands                           LS(1)
    
    NAME
           ls - list directory contents
    
    SYNOPSIS
           ls [OPTION]... [FILE]...
    
    DESCRIPTION
           List  information  about  the FILEs (the current directory by default).  Sort entries alphabetically if none of
           -cftuvSUX nor --sort.
    
           Mandatory arguments to long options are mandatory for short options too.
    
           -a, --all
                  do not ignore entries starting with .
    
           -A, --almost-all
                  do not list implied . and ..
    
           --author
                  with -l, print the author of each file
    
           -b, --escape
                  print octal escapes for nongraphic characters
    
    <snip 3 pages>
           Exit status is 0 if OK, 1 if minor problems, 2 if serious trouble.
    
    AUTHOR
           Written by Richard Stallman and David MacKenzie.
    
    REPORTING BUGS
           Report bugs to <bug-coreutils@gnu.org>.
    
    COPYRIGHT
           Copyright © 2006 Free Software Foundation, Inc.
           This is free software.  You may redistribute copies of it under the terms of the  GNU  General  Public  License
           <http://www.gnu.org/licenses/gpl.html>.  There is NO WARRANTY, to the extent permitted by law.
    
    SEE ALSO
           The  full  documentation  for  ls  is maintained as a Texinfo manual.  If the info and ls programs are properly
           installed at your site, the command
    
                  info ls
    
           should give you access to the complete manual.
    
    ls 5.97                          February 2010                           LS(1)
    
    
    The ls man page is about 4 screens long.
    man tar is 9 screens.
    man lsof is 40 screens long and ends with a list of SEE ALSO man pages!
  • Sometimes additional man pages are listed with a number in parentheses. man is divided into various sections. So a listing to see mount(8) means section 8 of man for the command mount which is entered as man 8 mount and has 23 screens of information.
  • info

    info is a newer method of displaying built-in "HowTo" information. The GNU project likes info over man so being able to use both is essential. info mount will display similar information to man mount but it's displayed very differently. Some sections are links and you can move to them directly with the [LIN:Tab] key. Pressing enter jumps to those links. A colorized version of info that many people find easier to navigate with is pinfo. It uses the j,k keys for down and up on the links keywords like vi uses the j,k keys.
    The q key will exit the environment of both man and info/pinfo