Getting Started with UNIX - A Quick Reference Guide - NetLingo The Internet Dictionary: Online Dictionary of Computer and Internet Terms, Acronyms, Text Messaging, Smileys ;-)

Getting Started with UNIX - A Quick Reference Guide

Print this page
This quick reference lists the commands presented in this manual concisely by function. Each listing includes a syntax diagram, and a brief description of the command.

1. Work Session

1.1. Log In

Type username to system login prompt.
Type password to password prompt.

1.2. Change Password

Type passwd, followed by old password, and repeat new password.

1.3. Log Out

Type logout or C-D depending upon system setup.

2. File System

2.1. Create File

Type cat > filename, then text ending with C-D, or see Editing Files.

2.2. Make (or Create) Directory

Type mkdir directory-name.

2.3. Look at File

Type cat filename or
more filename.

2.4. Print File

Type lp filename.

2.5. List Files and Directories

ls for listing of current directory
ls directory-name for listing of another directory
ls filename for listing of a single file
ls -t
or
ls -t filename
or
ls -t directory-name
to get a listing reverse sorted by time of last modification.
ls -F
or
ls -F directory-name to get a listing that marks current directory names by appending a "/" character to them.

2.6. Move (or Rename) Files and Directories

Type
mv source-filename destination filename to rename a file
mv source-filename destination-directory to move a file into another directory
mv source-directory-name destination-directory-name to rename a directory, or move it into another directory.

2.7. Copy Files

Type
cp source-filename destination-filename to copy a file into another filename
cp source-filename destination-directory to copy a file into another directory

2.8. Remove (or Delete) Files

Type
rm filename to remove a file
rmdir directory-name to remove an empty directory
rm -r directory-name to remove a directory and its contents.

2.9. Change Working Directory

Type
cd to change directories to your home directory
cd directory-name to change directories to another directory.

2.10. Find Name of Current Directory

Type pwd.

2.11. Pathnames

simple:
    One filename or directory name to access local file or directory.
absolute:
    List of directory names from root directory (first "/") to desired filename or directory name, each name separated by a "/".
relative:
    List of directory names from current position to desired filename or directory name, each name separated by a "/".

2.12. Directory Abbreviation

    ~ -- Home directory.
    ~username -- Another user's home directory.
    . -- Working directory.
    .. -- Parent of working directory.

Commands

3.1. Date and Time

Type date.
For universal time (Greenwich Mean Time), type date -u.

Learn Online Jargon