Linux Directories
Posted: 30 Sep 2010, 14:41
A Linux directory is a special file that acts as a container for other files and even other directories. You can create directories to hold groups of related files as an alternative to keeping all your files in one huge directory.
A Linux file system is like a filing cabinet with a bunch of folders, each of which can contain subfolders and files.
After installing Linux and creating a new hermie user account, you'll end up with a file system hierarchy like the one shown here.
As you can see, the file system resembles an upside-down tree and is very similar to the treelike directory structure in DOS. The top level is denoted by a slash (/) and is called the root directory. Several system-related directories such as bin, dev, and etc appear below the root directory--here's a summary of their purpose in life:
/bin Contains the Linux system commands and programs (also called binaries). Pronounced "slash bin."
/dev Contains special device files that correspond to hardware components. Pronounced "slash dev."
/etc Contains configuration files for Linux and other installed software. Pronounced "slash et-see."
/home Contains the home directories (personal storage) for each user on the system. Pronounced "slash home."
/sbin Contains more Linux binaries (special utilities not for general users). Pronounced "slash ess-bin."
/root The home directory for the root user; not to be confused with /. Some Linux systems use /home/root instead of
/root. Pronounced "slash root."
/usr Contains system programs and other files for general users such as games, online help, and documentation. By convention, a user should not put personal files in this directory. Pronounced "slash user."
Note: Unless you are an All-Knowing Linux Guru, you should never combine or delete any of the directories (or files therein) that appear just below the root directory. This could prevent your system from booting or operating properly.
Leason 1: The Linux File System
Leason 2: Linux File Names
Leason 3: Linux Directories
Leason 4: Directory Terminology
Leason 5: Navigating the File System
Leason 6: Listing Linux Files
Leason 7: Displaying Linux Files
Leason 8: Copying and Renaming Files
Leason 9: Creating Files and Directories
Leason 10: Deleting Files and Directories
Leason 11: Linux Files - Wildcards
Leason 12: The Nine Deadly Keystrokes
Leason 13: Linux File Permissions
Leason 14: Changing File Permissions
A Linux file system is like a filing cabinet with a bunch of folders, each of which can contain subfolders and files.
After installing Linux and creating a new hermie user account, you'll end up with a file system hierarchy like the one shown here.
Code: Select all
/ <-- The root of the file system
|
|
+------------+-------------+
| | | | | | |
| | | | | | |
bin dev etc home sbin root usr <-- Directories below the root
|
+-----+-----+
| |
hermie sigmund <-- User home directories
/bin Contains the Linux system commands and programs (also called binaries). Pronounced "slash bin."
/dev Contains special device files that correspond to hardware components. Pronounced "slash dev."
/etc Contains configuration files for Linux and other installed software. Pronounced "slash et-see."
/home Contains the home directories (personal storage) for each user on the system. Pronounced "slash home."
/sbin Contains more Linux binaries (special utilities not for general users). Pronounced "slash ess-bin."
/root The home directory for the root user; not to be confused with /. Some Linux systems use /home/root instead of
/root. Pronounced "slash root."
/usr Contains system programs and other files for general users such as games, online help, and documentation. By convention, a user should not put personal files in this directory. Pronounced "slash user."
Note: Unless you are an All-Knowing Linux Guru, you should never combine or delete any of the directories (or files therein) that appear just below the root directory. This could prevent your system from booting or operating properly.
Leason 1: The Linux File System
Leason 2: Linux File Names
Leason 3: Linux Directories
Leason 4: Directory Terminology
Leason 5: Navigating the File System
Leason 6: Listing Linux Files
Leason 7: Displaying Linux Files
Leason 8: Copying and Renaming Files
Leason 9: Creating Files and Directories
Leason 10: Deleting Files and Directories
Leason 11: Linux Files - Wildcards
Leason 12: The Nine Deadly Keystrokes
Leason 13: Linux File Permissions
Leason 14: Changing File Permissions