> 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 file system folders that compose the structure can be represented in the following diagram:

<figure><img src="/files/8yEsOIAwgctr9BfQ0GWp" 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`*****:** Store 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`*****:** Store 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`*****:** Contain 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 OS
* ***`/media`*****:** Where external devices are mounted


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://kryptocoder.gitbook.io/hacking-knowledge/linux/functional-structure.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
