Created
July 9, 2026 20:35
-
-
Save eas4ai/e178f02958af14d3a5d8a493fd4a9724 to your computer and use it in GitHub Desktop.
Linux Sandbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sandbox() { | |
| local name="${1:?Usage: sandbox <name>}" | |
| local workspace="$HOME/workspace/$name" | |
| bwrap \ | |
| --ro-bind / / \ | |
| --bind "$workspace" "$workspace" \ | |
| --dev /dev \ | |
| --proc /proc \ | |
| --tmpfs /tmp \ | |
| --unshare-pid \ | |
| --unshare-ipc \ | |
| --unshare-uts \ | |
| --die-with-parent \ | |
| bash --rcfile "$HOME/.bashrc" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment