The effort to build a consensus regarding the Linux directory structure began in 1993 with the Filesystem Hierarchy Standard (FHS), a draft proposal that addressed not only Linux issues, but also those of other operating systems, such as BSD. Red Hat has stated that it is committed to stay compliant with the FHS, which specifies the location and names of files and directories.

Ubuntu uses the current 2.3 standard. Key additions to this include the creation of a /media directory for removable storage devices such as DVD drives and zip disks (although keeping /mnt as a temporary mount point). udev has also been added to Ubuntu; although it is not a part of FHS 2.3, it enables /dev to become a dynamically managed folder allowing the hot-plugging of devices onto the system and the creation (on demand) of device nodes.

The commonality of how the Linux directory structure is laid out is very useful for open source developers because it cuts down the amount of work they have to do to get their programs to work with different distributions. For a programmer to know, for example, that the useradd command is always under /usr/sbin means that he can create shell scripts and other utilities that take advantage of this, and know that they will work universally. Perhaps unsurprisingly, given the ancestry of Linux, you will find that other UNIX-like operating systems follow the same directory organization. Of course, you will not get the most of knowing this secret unless you actually learn a little about how the directories are organized, along with the contents of files and directories, and where software should be installed and files stored.

A good knowledge of the Linux file system pays dividends to pretty much every system administrator. Knowing where to find configuration files as well as the location of key directories will help you fix your system faster when you have a problem.

Was this article helpful?

0 0

Post a comment