> For the complete documentation index, see [llms.txt](https://unsloth.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unsloth.ai/docs/de/neu/studio/sandboxing-in-unsloth.md).

# Sandboxing in Unsloth

Unsloth verwendet unter Linux bubblewrap, unter macOS Seatbelt und unter Windows MXC.

Unsloth verfügt jetzt über Sandboxing auf Betriebssystemebene, wodurch alle Tool-Aufrufe in einige Ordner isoliert werden, ohne Schaden auf Betriebssystemebene anzurichten. Unsloth hat 2 Modi - **"low"** und **"high" Sandbox-Sicherheit** - low verwendet Unsloths Software-Sandbox-Methoden, also ausgefeilte String-, AST- und Regex-Prüfungen für alle Tool-Aufrufe (gefährliches rm -rf, das Abziehen von Tokens usw. wird deaktiviert). High ist echtes Sandboxing auf Betriebssystemebene, das wir für alle Plattformen haben.

| Betriebssystem                              | Sandbox-Software                | Latenz pro Aufruf |
| ------------------------------------------- | ------------------------------- | ----------------- |
| <i class="fa-windows">:windows:</i> Windows | **MXC** (offiziell von Windows) | 164 ms            |
| <i class="fa-linux">:linux:</i> Linux       | Bubblewrap / Bwrap              | 50 ms             |
| <i class="fa-apple">:apple:</i> Mac         | Seatbelt (intern bei Mac)       | 110 ms            |

Um Sandboxing auf Betriebssystemebene zu aktivieren:

* **Windows - MXC ist vorinstalliert** für Windows 11 24H2 und höher.
* **Linux** - Bwrap muss installiert werden - wählen Sie "High", und wir installieren es für Sie
* **Mac - Seatbelt ist vorinstalliert**, daher aktiviert Unsloth Seatbelt automatisch

Um zu prüfen, ob das OS-Sandboxing Low oder High ist, klicken Sie auf die Berechtigungsschaltfläche:

<div align="left"><figure><img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FBdWF0MbLoJLwTeFVhX7j%2FScreenshot%202026-10-08%20at%207.00.50%E2%80%AFAM.png?alt=media&amp;token=a592513a-9f45-4e0b-80d4-b8a6456e37ac" alt="" width="563"><figcaption></figcaption></figure></div>

Wenn Sie auf "Mehr erfahren" klicken, gelangen Sie zur Seite mit den Sandbox-Einstellungen, und Sie können sehen, ob Software-Sandboxing aktiviert ist, und auch, wie Sie bwrap und MXC installieren können:

<div align="left"><figure><img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FfDEvjiXwBf1Fmftsp28q%2FScreenshot%202026-10-08%20at%206.56.34%E2%80%AFAM.png?alt=media&amp;token=b2c99b4c-67ea-4c50-bb98-4a710e0eafee" alt="" width="563"><figcaption></figcaption></figure></div>

Für alle 3 Betriebssysteme sehen Sie, wie Sandboxing auf Betriebssystemebene aktiviert wird:

{% columns %}
{% column %}
Windows:

<figure><img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FLnxxpIwGpSjut6R6kLn8%2FScreenshot%202026-10-08%20at%206.53.26%E2%80%AFAM.png?alt=media&amp;token=85be4503-5279-4716-a1d0-1efbb8126129" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column %}
Mac:

<img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FRNZyuJL7xkrXJwYxofto%2FScreenshot%202026-10-08%20at%206.51.19%E2%80%AFAM.png?alt=media&amp;token=04ee3ff8-209c-41f6-bed2-8c64173ea77f" alt="" width="375">
{% endcolumn %}

{% column %}
Linux:

<figure><img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FesfsF7INvYB1MpIQF3cn%2FScreenshot%202026-10-08%20at%206.53.20%E2%80%AFAM.png?alt=media&amp;token=33f9f7cd-df4e-4e74-89c4-0c482c64e3c5" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column width="50%" %}
Sie können die Sandbox in Aktion sehen, wo sie Zugriffe außerhalb des Arbeitsbereichs blockiert:

### Latenz des Sandboxings

Wir haben Software- und Hardware-Sandboxing auf Betriebssystemebene stark optimiert, aber Sandboxing auf Betriebssystemebene bringt definitiv einen Latenzaufschlag mit sich. Siehe unten eine Tabelle:
{% endcolumn %}

{% column width="50%" %}
![](https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FcyBycXfercRlu0iEttel%2Fnew%20sandbox.png?alt=media\&token=d9064a88-e5c8-4e1d-a261-e93f20739ea6)
{% endcolumn %}
{% endcolumns %}

| Betriebssystem                              | Sandbox-Software                | Low Sandbox | High Sandbox |
| ------------------------------------------- | ------------------------------- | ----------- | ------------ |
| <i class="fa-windows">:windows:</i> Windows | **MXC** (offiziell von Windows) | 8 ms        | 164 ms       |
| <i class="fa-linux">:linux:</i> Linux       | Bubblewrap / Bwrap              | 3 ms        | 50 ms        |
| <i class="fa-apple">:apple:</i> Mac         | Seatbelt (intern bei Mac)       | 10 ms       | 110 ms       |

{% columns %}
{% column %}

### Sandboxing deaktivieren / Berechtigungen umgehen / Vollzugriff

Um Sandboxing zu deaktivieren (sowohl Software-Low als auch OS-Level-High), drücken Sie einfach "Full Access", und Unsloth kann dann auf Ihren gesamten Computer mit 0 Einschränkungen zugreifen.
{% endcolumn %}

{% column %}

<figure><img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F6YpMXm0gOsM7lPaygu4T%2FScreenshot%202026-10-08%20at%206.45.21%E2%80%AFAM.png?alt=media&amp;token=b7f308f5-ac0b-4852-9eeb-961e6cc575ef" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### Ansatz für Software-Sandboxing

Software-Sandboxing in Unsloth ist eine Reihe von regulären Ausdrücken, String-Prüfungen und mehr - wir fügen etwa **1-2 ms zusätzliche Latenz** pro Tool-Aufruf hinzu, und wir blockieren Folgendes:

* Lösch- und Festplatten-Tools: `rm, dd, mkfs, fdisk, mount, umount`
* Berechtigungen und Privilegien: chmod, `chown, sudo, su, doas, pkexec, passwd`
* Netzwerk: `curl, wget, nc, ncat, netcat, socat, ssh, scp, sftp, rsync`
* Prozesse und Energie: `kill, killall, pkill, shutdown, reboot, halt, poweroff`
* Inhalte eines anderen Skripts unbemerkt ausführen: `eval, source`
* Nur Windows: `rmdir, takeown, icacls, runas, powershell, pwsh`

Python-Code, indem der Code gelesen wird, bevor er ausgeführt wird:

* Shell-Escapes: `os.system`, und `subprked` Befehl oder ein nicht-wörtlicher Befehl (zum Beispiel pip install über su)
* Netzwerkaufrufe: `requests, urllib`, rohe Socket-Verbindungen
* Einige sensible Systemzugriffe, wie etwa `/etc/passwd`
* Manipulation von Signalen oder Timeouts, um sie zu umgehen.

Auf jeden Aufruf in beiden Modi angewendet:

* Geheime Umgebungsvariablen werden entfernt.
* Eigene Anmeldedateien von Studio werden abgelehnt
* Beschränkungen für Prozesse, Dateigröße (100 MB), Speicher (8 GB) und CPU-Zeit (600 s), sodass ein Fork-Bomb die Prozessgrenze trifft, plus das Aufruf-Timeout

#### Windows-MXC-Partnerschaft

Vielen Dank an das Windows-Team für die Partnerschaft mit Unsloth, um MXC in Unsloth gut zum Laufen zu bringen! [Hier ansehen](https://blogs.windows.com/windowsexperience/2026/10/07/building-windows-for-hybrid-intelligence/) für den Launch-Blogbeitrag

#### Sandboxing in Unsloth einrichten

Aktualisieren Sie Unsloth einfach auf die neueste Version, und Sie erhalten Sandboxing!


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://unsloth.ai/docs/de/neu/studio/sandboxing-in-unsloth.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
