07 May, 2013

Linux Directory Structure

There are different directory structures by different distributions. Here we are discussing about the Linux Filesystem Hierarchy Standard (FHS).

    /bin _ directorey contains single_user mode / essential UNIX commands.

    /boot _ kernel file is stored in it and it helps to run during booting the machine.

    /dev _ the dev directory contains device files on system.

    /etc _ All system files and configurations used in this directory. Networking, NFS, and mail are example of subsystems. Includes mount disks and processes to run on startup, etc.

    /etc/rc.d _ directory contains a shell scripts. these scripts are run on bootup at different run levels.

    /etc/rc.d/init.d _ contains rpm-based system (binary), most of the initialization scripts themselves run in this directory.

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

    /etc/rc.d/rc*.d _ ''*'' shows run levels, it contains files for services to be started and stopped at that run level.

    /etc/skel _ contains several example or skeleton initialization shells.

    /etc/X11 _ contains X Window system configuration files.

    /home _ contains individual users home directories.

    /lib _ consists standard shared library files.

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

    /mnt _ in this direcotry we can mount devices such as cd_rom, hard_drives etc.

    /proc _ all running processes show in the directory and provides a number of system statistics.

    /root _ home directory for root.

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

    /tmp _ direcoty stores temporary files. It specifically designed for programs and users to store tmp files.

    /usr _ this is main directory containing a number of subdirectory with documentation, libraries, programs, etc.

    /usr/bin _ directory contains most user commands. Should not contain binaries necessary for booting the system, which go in /bin.

    /usr/doc _ location of miscellaneous documentation.

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

    /usr/info _ primary location of the GNU info system files.

    /usr/lib _ contains library files (libc.a) searched by the linker when programs are compiled.

    /usr/local/bin _ directory another place to look for comon executables.

    /usr/man _ location of manual page files.

    /usr/sbin _ other commands used by superuser for system administration.

    /usr/share _ contains subdirectories where many installed programs have configured, setup and auxiliary files.

    /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 _ contains the kernel sources.

    /var _ directory contains administrative files such as log files used by various utilities.

    /var/log/packages _ directory contains files and has detailed information on an installed package in slackware.

    /var/log/scripts _ package installation scripts are stored here.

    /var/spool _ in this directory, mail that has not yet been picked up, etc.


No comments:

Post a Comment