Monday, April 19, 2021
More

    Linux Directory Structure

    Must Read

    Programmerhttp://www.improgrammer.net
    We started this site to inspire young minds to motivate and encourage them towards Programming Language. In this site you will get programming tutorials, tech, programming facts, programming fun and programming blogs.

    Do you know about Directory Structure of Linux? In this article, we discuss Linux Directory Structure. Linux file systems contain some directories. The Filesystem Hierarchy Standard (FHS) defines the structure of file systems in Unix/Linux, like operating systems. It is maintained by the Linux Foundation.

    Linux is a complex system. It requires an efficient way to start, stop, maintain and reboot a system, unlike Windows. There is a well-defined configuration file, binaries, man pages, info files, etc. for every process in Linux.

    Here we provide a list of the directory contains important information, required for booting to device drivers, configuration files, etc. Let’s start in brief with an example.

    Directory 

    Description

    Example

    / – Root Every single file and directory starts from the root directory.

    • All things in the Linux system is located under the / directory, that is known as Root Directory.
    • It is the home directory for the user.
     /bin – User Binaries Contains binary executables.

    • Applications are stored in /usr/bin like Firefox
    • All the commands used by all the users of the system are located here
    s, ls, ping, grep, cp
    /sbin – System Binaries Contains binary executables,Just like /bin

    • system administrator commands located under this directory
    iptables, reboot, fdisk, ifconfig, swapon
    /etc – Configuration Files Contains startup and shutdown shell scripts used to start/stop individual programs.

    • system-wide configuration files – user-specific configuration files are located here
    /etc/resolv.conf, /etc/logrotate.conf
    /dev – Device Files Contains device files.

    •  /dev/sda represents the first SATA drive in the system
     /dev/tty1
    /var – Variable Files The content of the files that are expected to grow can be found under this directory.

    • /var directory is the writable counterpart to the /usr directory
    system log files (/var/log)
    /tmp – Temporary Files Temporary files created by system and users.

    • These files are generally deleted whenever your system is restarted
    /usr – User Programs Contains binaries, libraries, documentation, and source-code for second level programs.

    • usr directory contains applications and files used by users
    /usr/lib -contains libraries for /usr/bin
    /home – Home Directories store their personal files for all users

    • This directory contains a home folder for each user
    /home/xyz
    /boot – Boot Loader Files Contains bootloader related files. vmlinuz-2.6.32-24-generic
    /lib – System Libraries Contains library files that support the binaries located under /bin and /sbin  libncurses.so.5.7
    /opt – Optional add-on Applications Contains add-on applications from individual vendors. installed under either /opt/ or /opt/ sub-directory.
    /mnt – Mount Directory Temporary mount directory where sysadmins can mount filesystems

     

    Similar Stuff:  Linux commands cheat sheet

    Latest Articles

    More Recipes Like This