Linux Directory Structure

Raj Upadhyay
2 min readJul 17, 2023

Today let’s take look at “well-known top-level Linux directory list”.

  1. / → Everything, all the files and directories, in Linux are located under ‘root’ represented by ‘/’.
  2. /bin → contains the executable files of many basic shell commands. (E.g. : ls, cp)
  3. /sbin → Same as “/bin” it contains executable but commands located under this directory are often used by system administrator, for system maintenance purpose (E.g. : iptables )
  4. /etc → configuration files required by all programs. ( E.g. : /etc/resolv.conf)
  5. /dev → It contains device files (E.g. : /dev/tty)
  6. /proc → Contains information about system process (running process). (E.g. :/proc/uptime)
  7. /var → It contains data from different programs. programs store runtime information like system logging, user tracking, caches, and other files that system programs create and manage. (E.g. : system log files (/var/log))
  8. /tmp → Contains temporary files created by system and users.
  9. /usr → Contains binaries, libraries, source code etc. ( ‘/usr/bin’ basic user commands, ‘/usr/sbin’ commands for the administrator, ‘/usr/lib’ system libraries, ‘/usr/share’ contains documentation or common to all libraries)
  10. /home → It will store all users data.
  11. /boot → Contains boot loader related files.
  12. /lib → Contains library files that supports the binaries located under /bin and /sbin
  13. /opt → used for installing/storing the files of third-party applications
  14. /mnt → Temporary mount directory
  15. /media → Temporary mount directory for removable devices.

--

--

Raj Upadhyay

Pursuing M. Tech. in Cyber Security and Incident Response. #LoveToPlayCTF #infosec #cybersecurity