Network Administration: Linux File System Basics - dummies

Network Administration: Linux File System Basics

The Linux operating system is different from Windows and one of the fundamental differences is in the file system. Two of the most obvious differences are actually superficial:

  • Linux uses forward slashes rather than backward slashes to separate directories. Thus, /home/doug is a valid path in Linux; WindowsSystem32 is a valid path in Windows.

  • Linux filenames don’t use extensions. You can use periods within a filename, but unlike Windows, the final period doesn’t identify a file extension.

The fundamental difference between the Linux and Windows file system is that Linux treats everything in the entire system as a file, and it organizes everything into one gigantic tree that begins at a single root. Everything, including hardware devices such as floppy drives, serial ports, and Ethernet adapters are treated as files.

The root of the Linux file system is the root partition from which the operating system boots. Additional partitions, including other devices that support file systems such as CD-ROM drives, floppy drives, or drives accessed over the network, can be grafted into the tree as directories called mount points. Thus, a directory in the Linux file system may actually be a separate hard drive.

Another important aspect of the Linux file system is that the directories that compose a Linux system are governed by a standard called the Filesystem Hierarchy Standard (FHS). This standard spells out which directories a Linux file system should have. Because most Linux systems conform to this standard, you can trust that key files will always be found in the same place.

Top-Level Directories in a Linux File System
Directory Description
/bin Essential command binaries
/boot Static files of the boot loader
/dev Devices
/etc Configuration files for the local computer
/home Home directories for users
/lib Shared libraries and kernel modules
/mnt Mount point for file systems mounted temporarily
/opt Add-on applications and packages
/root Home directory for the root user
/sbin Essential system binaries
/tmp Temporary files
/usr Read-only, shared files such as binaries for user commands and
/var Variable data files