Short reference of UNIX commands

This list is for reference purposes only. More thorough explanations for some commands can be found here.

Terminal Control Characters for C-shell

    ^h, backspace       erase previously typed character 
    ^u          erase entire line of input so far typed
    ^d          end-of-input for programs reading from terminal
    ^s          stop printing on terminal
    ^q          continue printing on terminal
    ^z          suspend currently running job; restart with bg or fg
    DEL, ^c     kill currently running program and allow 
                        clean-up before exiting 
    ^\          emergency kill of currently running program     
                        with no chance of cleanup

Login and Authentication

    login       access computer; start interactive session
    logout      disconnect terminal session
    passwd      change local login password; you MUST set a
                        non-trivial password


    man         show on-line documentation by program name
    info        on-line documentation for GNU programs
    date        show date and time
    history     list of previously executed commands 
    pine        read or send e-mail messages or network news groups
    w, who      who is on the system and what are they doing 
    whoami      who is logged onto this terminal
    top         show system stats and top CPU-using processes
    uptime      show one line summary of system status
    finger      find out info about a user@system
    whois       look up information in Stanford directory

File Management

    cat         combine files
    cp          copy files
    ls          list files in a directory and their attributes
    mv          change file name or directory location
    rm          remove files
    ln          create another link (name) to a file
    chmod       set file permissions
    crypt       encode/decode a file with a private key
    gzip, gunzip, 
    zip, unzip, 
    tar         compress/decompress a file
    find        find files that match specified criteria

Display Contents of Files

    cat         copy file to display device 
    more        show text file on display terminal with paging control
    head        show first few lines of a file(s)
    tail        show last few lines of a file; or reverse line order
    vi          full-featured screen editor for modifying text files  
    pico        simple screen editor for modifying text files  
    grep        display lines that match a pattern
    lpr         send file to line printer
    diff        compare two files and show differences
    cmp         compare two binary files and report if different
    file        examine file(s) and guess type: text, data, program, etc.
    wc          count characters, words, and lines in a file


    cd          change to new directory
    mkdir       create new directory
    rmdir       remove empty directory (remove files first)
    mv          change name of directory
    pwd         show current directory 


    df          summarize free space on disk device 
    du          show disk space used by files or directories

Special Character Handling for C-shell (See "man csh")

    *           match any characters in a file name
    ~user       shorthand for home directory of "user"
    $name       substitute value of variable "name"
    \           turn off special meaning of character that follows
    '           In pairs, quote string w/ special chars, except !
    "           In pairs, quote string w/ special chars, except !, $
    `           In pairs, substitute output from enclosed command

Controlling Program Execution for shell (See "man csh" or "man bash")

    &           run job in background
    DEL, ^c     kill job in foreground
    ^z          suspend job in foreground
    fg          restart suspended job in foreground
    bg          run suspended job in background 
    ;           delimit commands on same line
    ()          group commands on same line
    !           re-run earlier command from history list
    jobs        list current jobs 
    ps          print process status
    kill        kill background job or previous process
    nice        run program at lower priority
    at          run program at a later time
    crontab     run program at specified intervals
    limit       see or set resource limits for programs
    alias       create alias name for program (in .login)
    csh, bash   execute command file       

Controlling Program Input/Output for shell (See "man csh" or "man bash")

    |           pipe output to input
    >           redirect output to a storage file
    <           redirect input from a storage file
    >>          append redirected output to storage file
    tee         copy input to both file and next program in pipe
    script      make file record of all terminal activity

E-mail and communication

    pine        process mail with full-screen menu interface
                        or read USENET news groups
    mail        send/read e-mail; can be run by other programs to 
                        send existing files via e-mail
    uuencode, uudecode  encode/decode a binary file for
                        transmission via mail
    checkema    check specified e-mail addresses to see if they are 
                        valid, by contacting remote system(s)
    finger      translate real name to account name for e-mail
    whois       look up e-mail addresses in Stanford directory
    talk        interactive communication in real-time

Editors and Formatting Utilities

    sed         stream text editor
    vi          full-featured editor for character terminals
    emacs       GNU emacs editor for character terminals
    xemacs      GNU emacs editor for X-Windows terminals
    pico        very simple text editor, same as used in "pine"
    fmt         fill and break lines to make all same length
    fold        break long lines to specified length

X-Window Client Programs (output to X terminal or server)

    xterm       provide login shell window
    xauth       manipulate authorization files
    xload       show system load
    xman        full screen on-line manual viewer
    pinex       send or receive mail messages
    xemacs      GNU emacs editor
    gv          interface to control "gs" to display PostScript
                        or PDF files on screen
    xdvi        display DVI files on X-Window (screen preview)
    netscape    Web browser
    gnuplot     interactive data plotting on screen

TeX Typesetting System

    tex         process TeX files to DVI (device independent) output
    latex       process LaTeX files to DVI
    texpr       process and print TeX and LaTeX in one step
    dvips       print DVI files on Postscript laser printer
    xdvi        display DVI files on X-Window (screen preview)
    latex2html  translate LaTeX files to HTML (for Web pages)


    lpr         send file to print queue
    lpq         examine status of files in print queue
    lprm        remove a file from print queue
    op lpc abort "q"    abort print queue "q" to clear printer
                                (all files saved)
    op lpc start "q"    restart print queue "q"
    enscript    convert text files to PostScript format for printing

Interpreted Languages and Data Manipulation Utilities

    sed         stream text editor
    awk         pattern scanning and processing language; 1985 vers.
    perl        Practical Extraction and Report Language
    sort        sort or merge lines in a file(s) by specified fields
    tr          translate characters
    cut         cut out columns from a file
    paste       paste columns into a file
    dd          copy data between devices; reblock; convert EBCDIC

Graphics and Mapping

    gnuplot     interactive data plotting; outputs to PostScript or
    GMT         general 2D and 3D data processing and plotting
                        software package; also plots maps.
    gs          "ghostscript" converter displays PostScript files
                        on X-Window displays or other devices


    ssh	        remote login/command execution; encrypted
    scp	        remote non-interactive file copy; encrypted
    sftp        remote interactive file copy; encrypted
    telnet      remote network login - plain text passwords
    ftp         network file transfer program - plain text passwords
    rlogin      remote login to "trusted" computer that is not
    rsh         execute single command on remote "trusted" computer
    rcp         remote file copy to/from "trusted" computer
    host        find IP address for given host name, or vice versa
    netscape    Web browser for X-window terminals/servers
    lynx        Web browser for character based (text-only) terminals
    man dialup  information on modem connections to Stanford
    kermit      transfer files over modem connections
    gzip, gunzip        compress/decompress a file
    tar         combine multiple files/dirs into single archive
    uuencode, uudecode  encode/decode a binary file for
                        transmission via mail