Command-Line Help

team bbl


Linux provides several commands that give help with the details of its many commands:

  • help: Gives a list of the shell commands, a subset of Linux commands including cd, alias, bg, jobs, and others. Type helpcommandname for details.

  • man: The man (manual) pages document all the programs on Linux. To see the details of any command, type mancommandname. If you don't know the name of the command you want, you can search all the descriptions using the -k option. For example, if you type man -k copy, a list of all commands that have copy in their description displays.

  • info: A program that displays online documentation via a hierarchical menu of topics that you can select. In addition, related information is hyperlinked. Info often contains information that is more complete, with more conceptual information, than the man pages. When you type info with no arguments, the top-level menu displays. If you know a topic name, you can type infotopicname.

  • help option: Many programs have an option that displays information about using the program. It's worth a try to type the program name, followed by either -h or --help. For instance, typing info --help displays a brief help file.

Man pages are divided into numbered sections, based on the type of command, such as executable programs, system calls, or games. Most of the commands you are interested in while learning Linux are in section 1Executable programs or shell commands. If you specify the section number, the man command does not need to search all the man pages, only one section, speeding the command considerably. For instance, you might use the following command to look up all the available options for the ls command:

 man 1 ls 

When software is installed on Linux, the associated help, man, and/or info files are installed in the appropriate location. The man command looks for files in a specific directory, in subdirectories for each section. To see where the man pages are located, type manpath at the command line.

    team bbl



    Spring Into Linux
    Spring Into Linux
    ISBN: 0131853546
    EAN: 2147483647
    Year: 2005
    Pages: 362
    Authors: Janet Valade

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net