Tuesday, December 28, 2010

Important RHEL Directories & their usage

Important Linux Directories :


Different distributions have different directory structures, despite attempts at standardization such as the the Linux Filesystem Hierarchy Standard (FHS) organization.

/bin - essential UNIX commands such as ls, etc. Should contain all binaries needed to boot the system or run it in single-user mode

/boot - files used during booting and possibly the kernel itself are stored here

/dev - contains device files for various devices on system

/etc - files used by subsystems such as networking, NFS, and mail. Includes tables of disks to mount, processes to run on startup, etc.

/etc/profile.d - contains scripts that are run by /etc/profile upon login.

/etc/rc.d - contains a number of shell scripts that are run on bootup at different run levels. A rc.local script that can be edited to run commands desired by the administrator, along the lines of autoexec.bat in DOS.

/etc/rc.d/init.d - contains most of the initialization scripts themselves on an rpm-based system.

/etc/rc.d/rc*.d - where ``*'' is a number corresponding to the default run level. Contains files for services to be started and stopped at that run level. On rpm-based systems, these files are symbolic links to the initialization scripts themselves, which are in /etc/rc.d/init.d.

/etc/skel - directory containing several example or skeleton initialization shells. Often contains subdirectories and files used to populate a new user's home directory.

/etc/X11 - configuration files for the X Window system

/home - home directories of individual users

/lib - standard shared library files

/lib/modules - modular device driver files, most with .o extensions

/mnt - typical mount point for many user-mountable devices such as floppy drives, cd-rom readers, etc. Each device is mounted on a subdirectory of /mnt.

/proc - virtual file system that provides a number of system statistics

/root - home directory for root

/sbin - location of binaries used for system administration, configuration, and monitoring

/tmp - directory specifically designed for programs and users to store temporary files.

/usr - directory containing a number of subdirectory with programs, libraries, documentation, etc.

/usr/bin - contains most user commands. Should not contain binaries necessary for booting the system, which go in /bin. The /bin directory is generally located on the same disk partition as /, which is mounted in read-only mode during the boot process. Other filesystems are only mounted at a later stage during startup, so putting binaries essential for boot here is not a good idea.

/usr/bin/X11 - most often a symbolic link to /usr/X11R6/bin, which contains executable binaries related to the X Window system

/usr/share/doc - location of miscellaneous documentation, and the main location of program documentation files in RHL

/usr/share - contains subdirectories where many installed programs have configuration, setup and auxiliary files

/usr/share/info - primary location of the GNU info system files [.gz]

/usr/include - standard location of include files used in C programs such as stdio.h

/usr/lib - standard library files such as libc.so. Searched by the linker when programs are compiled.

/usr/lib/X11 - X Window system distribution

/usr/local/bin - yet another place to look for comon executables

/usr/share/man - location of manual page files

/usr/sbin - other commands used by superuser for system administration

/usr/src - location of source programs used to build system. Source code for programs of all types are often unpacked in this directory.

/usr/src/linux - often a symbolic link to a subdirectory whose name corresponds to the exact version of the Linux kernel that is running. Contains the kernel sources.

/var - administrative files such as log files, mail files etcu sed by various utilities

/var/spool - temporary storage for files being printed, mail that has not yet been picked up, etc.

No comments:

Post a Comment