Directories

A directory is a file whose sole job is to store file names and related information. All files, whether ordinary, special, or directory, are contained in directories.

UNIX uses a hierarchical structure for organizing files and directories. This structure is often referred to as a directory tree . The tree has a single root node, the slash character ( /), and all other directories are contained below it.

Home Directory:
The directory in which you find yourself when you first login is called your home directory.

You will be doing much of your work in your home directory and subdirectories that you'll be creating to organize your files.

You can go in your home directory anytime using the following command:

$cd ~
$
Here ~ indicates home directory. If you want to go in any other user's home directory then use the following command:

$cd ~username
$
To go in your last directory you can use following command:

$cd -
$