Five ways to get help in the Mac OS X Command Line

Feb 24, 2007 - 4 Comments

Whether you’re a unix novice or veteran, if you’re using the command line you’ll often find yourself looking up exactly how to use a specific command for either its full functionality or proper syntax. Many of us will just google a command if we can’t seem to get things to work properly, but before you go that route you should try the available resources that are built right in. There’s no shame in needing assistance, so here are five ways to get help in the command line:

Command Action / Results
man (command) Display the manual page for (command). eg: man lsof
whatis (command) Display a one line brief summary of specified command. eg: whatis lsof
(command) --help Display command usage information including available flags and proper syntax. eg: lsof –help
apropos (string) Searches the whatis database for (string), helpful in finding commands. eg: apropos ssh
(command)+tab key Begin typing a command, and hit the tab key to autocomplete, or to list available commands that start with the typed prefix.

Note: be sure to remove the parenthesis () to get each command to work properly.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: OSXDaily in Command Line, How to, Mac OS X

4 Comments

» Comments RSS Feed

  1. You forgot : info

    INFO(1) User Commands INFO(1)

    NAME
    info – read Info documents

    SYNOPSIS
    info [OPTION]… [MENU-ITEM…]

    DESCRIPTION
    Read documentation in Info format.

    EXAMPLES
    info show top-level dir menu

    info emacs
    start at emacs node from top-level dir

    info emacs buffers
    start at buffers node within emacs manual

    info –show-options emacs
    start at node with emacs’ command line options

    info -f ./foo.info
    show file ./foo.info, not searching dir

  2. jared says:

    that is great so is the info command but I don’t understand the purpose of apropos and what it possibly does

  3. Chris says:

    Let’s say you’re programming and need to look up information regarding sockets, but socket(3) didn’t provide the information you are looking for.

    Doing ‘apropos socket’ will get you a list of _all_ manual pages talking about sockets, like accept(3), bind(3) and connect(3).

  4. Foeliitanioto says:

    Settykita
    yf5f

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates