Linux Know-How provides a collection of introductory texts on often needed Linux skills. |
Home Newbie Guide Basic Operations Basics File System Tree | ||||||||||||||
See also: More about the /proc file system, File Systems, Where are my drives? | ||||||||||||||
Search the VIAS Library | Index | ||||||||||||||
File System TreeLinux file system tree is large and complicated. It will vastly improve your skills if you familiarize yourself with it. Briefly, typical Linux contains five file systems. These file systems can reside on a single or different physical hard drives and/or hard drive partitions, depending on the size and need of your system. (A single file system can also be distributed between different physical devices, if needed.)
The parts of the root file system are: /bin--executables (binaries) needed during bootup that might be used by normal users. /sbin--executables (system binaries) not intended for use by general users (users may still use them, but this directory is not on their PATH). /etc--system-wide configuration files for your operating system. /root--the home directory of the system administrator (called super-user or root). /dev--device files. Devices appear on Linux as files so that hardware is abstracted and it is easy to write to them or read from them. /mnt--mount points for removable media (floppy, cdrom, zipdrive), partitions of other operating systems (e.g. MS Windows), network shares, and anything else that is mounted on the file system temporarily. It normally contains a separate subdirectory for each mounting share. The contents of these drives/shares appear in these subdirectories--there are no drive letters on Linux. /lib--shared libraries for programs that reside on the root file system and kernel modules. /boot--files used by the bootstrap loader (LILO or GRUB), the thing that loads first when the computer is booted and perhaps gives you the option of which operating system to boot, if you have more than one OS on your computer). It typically also contains the Linux kernel (compressed, file vmlinuz), but this can be stored somewhere else, if only LILO is configured to know where it is. /opt--optional large applications, for example kde under RedHat 5.2 (under RedHat 6.0, kde is distributed as any other X-windows distribution, main executables are in the /usr/bin directory). /tmp--temporary files. This directory may clean up automatically. /lost+found--files recovered during the file system repair. The most interesting parts of the /usr file system are: /usr/X11R6--X-windows system (version 11, release 6). /usr/X11--the same as /usr/X11R6 (it is a symbolic link to /usr/X11R6). /usr/X11R6/bin --lots of small X-windows apps, and perhaps symbolic links to the executables of some larger X-windows applications that reside in their own subdirectories somewhere else). /usr/doc--Linux documentation (on newer systems, this moved to /usr/share/doc). /usr/share --Data independent from your computer architecture, e.g., dictionary words. /usr/bin and /usr/sbin--similar to their equivalents on the root file system (/bin and /sbin), but not needed for basic bootup (e.g. during emergency maintenance). Most commands will reside here. /usr/local--the applications installed by the local administrator (perhaps each application in a separate subdirectory). After the "main" installation, this directory is empty. The contents of this directory should survive normal re-installation or upgrade of the operating system. /usr/local/bin--perhaps smaller "user"-installed executables, plus symbolic links to the larger executables contained in separate subdirectories under /usr/local. It is important to understand that all directories appear in a single directory tree, even if the directories are contained on different partitions, physical drives (including floppies, etc), or even if they are distributed over the network. Therefore, there are no DOS-type "drive letters" under Linux. What would be a "drive" under DOS or MS Windows, appears on Linux as a subdirectory in a special "mounting" location. The directory system is well-established and standard on most Linux distributions (the small differences are being currently addressed by the Linux Standard Base). It is also quite similar to that found on typical commercial UNIX systems. To summarize:
|
||||||||||||||
Home Newbie Guide Basic Operations Basics File System Tree |