12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

102CHAPTER 4Understanding <strong>Linux</strong> ConceptsFilesystem Hierarchy SystemThe location of the files and directories in a <strong>Red</strong> <strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong> system are based onthe Filesystem Hierarchy System (FHS) guidelines. The purpose of the FHS is to provide guidelinesfor file and directory locations for UNIX-based operating systems such as <strong>Linux</strong>. Themajor advantages of using the FHS are the predictability and consistency of file locations.Instead of an administrator searching the entire filesystem for a particular type of file, hecan know that it will be in one of a few established locations. For example, most configurationfiles are in the /etc/ directory, and log files are in the /var/log/ directory.TIPFor more information on the FHS, refer to http://www.pathname.com/fhs/.If you have ever browsed around a <strong>Linux</strong> filesystem, you might have noticed that the /bin/,/usr/bin/, /sbin/, and the /usr/sbin/ directories contain commands but that only thecommands in /bin/ and /usr/bin/ are in your PATH by default. (When you execute acommand, it must be in one of the directories in your PATH environment variable or youwill receive the command not found error message even if the command exists on thesystem. Refer to the “Shell Basics” section later in this chapter for details.) This is because,according to the FHS, /bin/ contains essential user commands that can be used by administratorsand users, and /usr/bin/ contains most user commands. On the other hand, /sbin/should only contain essential system administration commands, and /usr/sbin/ containsadditional administration utilities. Usually, the commands in the /sbin/ and /usr/sbin/directories can only be executed by root. The FHS guidelines for these directories makes iteasy to find commands and separate them by who is allowed to execute them.An administrator is constantly monitoring log files for error messages, connections byunauthorized users, disk usage, and more. Because the FHS defines the /var/log/ directoryas the location for log files, it is easy for an administrator to find the log files she islooking for because they are all in one common directory.Table 4.1 describes some commonly used directories and their purpose according to the FHS.TABLE 4.1 Common Directories and Their FHS PurposeDirectoryFHS Purpose/bin/Essential commands for admins and users/usr/bin/Common commands for admins and users/sbin/Essential commands for admins/usr/sbin/Common commands for admins/tmp/Temporary files for all users/usr/local/ Location for locally-installed software independent of operatingsystem updates/usr/share/man/ Manual pages (refer to the “Manual Pages” section in this chapterfor details)/usr/src/Source code

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!