1./–root
- Every single file and directory starts from the root directory.
- Only the root user has the write privilege under this directory.
- Please note that That/root is root user's home directory, which is not same as/.
2./bin–user Binaries
- Contains binary executables.
- Common Linux commands you need to use in Single-user modes is located under this directory.
- Commands used by all the users of the system is located here.
- For Example:ps, ls, ping, grep, CP.
3./sbin–system Binaries
- Just Like/bin,/sbin also contains binary executables.
- But, the Linux commands located under this directory is used typically by system aministrator, for system maintenance pur Pose.
- For Example:iptables, reboot, Fdisk, ifconfig, Swapon
4./etc–configuration Files
- Contains configuration files required by all programs.
- This also contains startup and shutdown shell scripts used to start/stop individual programs.
- For example:/etc/resolv.conf,/etc/logrotate.conf
5./dev–device Files
- Contains device files.
- These include terminal devices, USB, or any device attached to the system.
- For example:/dev/tty1,/dev/usbmon0
6./proc–process Information
- Contains information about system process.
- This was a pseudo filesystem contains information about running process. For example:/proc/{pid} directory contains information on the process with that particular PID.
- This was a virtual filesystem with the text information about system resources. For example:/proc/uptime
7./var–variable Files
- var stands for variable files.
- Content of the files that is expected to grow can is found under this directory.
- This includes-system log files (/var/log); Packages and database files (/var/lib); Emails (/var/mail); print queues (/var/spool); Lock files (/var/lock); Temp files needed across reboots (/var/tmp);
8./tmp–temporary Files
- Directory: Contains temporary files created by system and users.
- Files under this directory was deleted when the system is rebooted.
9./usr–user Programs
- Contains binaries, libraries, documentation, and Source-code for second level programs.
- /usr/bin contains binary files for user programs. If you can ' t find a user binary under/bin, look under/usr/bin. For Example:at, awk, CC, less, SCP
- /usr/sbin contains binary files for system administrators. If you can ' t find a system binary Under/sbin, look under/usr/sbin. For EXAMPLE:ATD, Cron, sshd, Useradd, Userdel
- /usr/lib contains libraries For/usr/bin And/usr/sbin
- /usr/local contains users programs that the install from source. For example, when you install Apache from source, it goes under/usr/local/apache2
Ten./home–home directories
- Home directories for all users to store their personal files.
- For example:/home/john,/home/nikita
/boot–boot Loader Files
- Contains boot loader related files.
- Kernel initrd, Vmlinux, grub files is located under/boot
- For Example:initrd.img-2.6.32-24-generic, Vmlinuz-2.6.32-24-generic
/lib–system Libraries
- Contains library files that supports the binaries located under/bin and/sbin
- Library filenames is either ld* or lib*.so.*
- For example:ld-2.11.1.so, libncurses.so.5.7
/opt–optional Add-on Applications
- OPT stands for optional.
- Contains add-on applications from individual vendors.
- Add-on applications should be installed under Either/opt/or/opt/sub-directory.
/mnt–mount Directory
- Temporary mount directory where sysadmins can mount filesystems.
/media–removable Media Devices
- Temporary mount directory for removable devices.
- For examples,/media/cdrom for CD-ROM; /media/floppy for floppy drives; /media/cdrecorder for CD writer
/srv–service Data
- SRV stands for service.
- Contains Server specific services related data.
- For example,/srv/cvs contains CVS related data.
Ref: Linux Directory Structure (File System Structure) explained with Examples