> For the complete documentation index, see [llms.txt](https://kryptocoder.gitbook.io/hacking-knowledge/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kryptocoder.gitbook.io/hacking-knowledge/linux/functional-structure.md).

# Functional Structure

The *Linux* operating system is **structured** in a tree-like form and follows the Filesystem Hierarchy Standard (FHS). The main filesystem folders that compose the structure can be represented in the following diagram:

<figure><img src="https://1571945027-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtgxeteB8N7iEoJU7WZh6%2Fuploads%2FHRbbev30BhPr0dYDUHED%2Fimage.png?alt=media&amp;token=e4fd0774-987c-43ed-b388-e60034c1fab4" alt="" width="563"><figcaption><p><a href="https://academy.hackthebox.com/module/18/section/94">https://academy.hackthebox.com/module/18/section/94</a></p></figcaption></figure>

## <mark style="color:blue;">Common Directories</mark>

Some common directories in a *Linux* filesystem that play key roles in system configuration, file storage, operational functions, and performance are:

* ***`/`*****:** The root filesystem, where all of the files required to boot Linux are stored
* ***`/etc`*****:** Stores configuration files that are used by the operating system
  * ***`/etc/bash.bashrc`*****:** Script that contains bash settings
  * ***`/etc/passwd`*****:** List of all user accounts
  * ***`/etc/issue`*****:** Usually contains information about the OS
  * ***`/etc/crontab`*****:** Contains the cron jobs that are executed by the system
  * ***`/etc/shadow`*****:** Contains encrypted information about credentials
* ***`/var`*****:** Stores data that is frequently accessed or written by services or applications running on the system
  * ***`/var/www/html`*****:** Default store for the server root folder
* ***`/root`*****:** Home directory of the root system user
* ***`/tmp`*****:** Temporary files that store data that is only needed to be accessed once or twice. Once the computer is restarted, the content of this folder is cleared out
* ***`/opt`*****:** Stands for optional, normally third-party software information
* ***`/bin`*****:** Basic programs of Unix (binaries)
* ***`/sbin`*****:** Binary programs for system administration
* ***`/usr`*****:** Contains users' information
  * ***`/usr/bin`*****:** Installed packages and applications
  * ***`/usr/share`*****:** Application support and data files
* ***`/proc`*****:** Contains information about internal jobs and processes of the system
  * ***`/proc/version`*****:** Information about the OS
* ***`/media`*****:** Where external devices are mounted
