DISTROBOX-HOST-EXEC(1)
β¨ DISTROBOX-HOST-EXEC β¨
okay so bestie, welcome to the distrobox-host-exec manual page π (that's the DISTROBOX-HOST-EXEC(1) one, from the User Manual, in case you were wondering which page you just opened π)
πΈ NAME πΈ
distrobox-host-exec β the little icon that lets you run stuff on the host while you're vibing inside a container π
π DESCRIPTION π
okay so here's the tea: distrobox-host-exec lets one execute command on the host, while inside of a container. literally the whole point. you're in the container, but the command happens back on the host. it's giving teleportation β¨
under the hood, distrobox-host-exec uses host-spawn, a project that lets us execute commands back on the host. no cap. and if that tool is not found, the user will be prompted to install it π«Ά (we gotchu, we'll ask nicely).
π¦ SYNOPSIS π¦
just pass to distrobox-host-exec any command and all its arguments, if any. that's it. that's the whole vibe. π
--help/-h: show this message
--verbose/-v: show more verbosity
--version/-V: show version
--yes/-Y: Automatically answer yes to prompt:
host-spawn will be installed on the guest system
if host-spawn is not detected.
This behaviour is default when running in a non-interactive shell.
quick rundown of those, bestie:
--help,-hβ show this message π--verbose,-vβ show more verbosity, i.e. the plot thickens π£οΈ--version,-Vβ show version π·οΈ--yes,-Yβ Automatically answer yes to prompt:host-spawnwill be installed on the guest system ifhost-spawnis not detected. This behaviour is default when running in a non-interactive shell. (so if you're in a script, it just goes ahead and does it, no questions asked π)
if no command is provided, it will execute $SHELL. periodt. π
alternatively, you can symlink a command name to distrobox-host-exec and then call that command by its name on the host, while inside of a container. yes, that's real. yes, it's iconic. π₯
π EXAMPLES π
Run individual commands πβοΈ
distrobox-host-exec ls
distrobox-host-exec bash -l
distrobox-host-exec flatpak run org.mozilla.firefox
distrobox-host-exec podman ps -a
look at her go β¨
Drop into host shell π
~$: distrobox-host-exec # No command, executes "$SHELL" on the host
~$: distrobox-host-exec # This command now runs on the host
You must run distrobox-host-exec inside a container!
bestie. read that last line again. π you must run distrobox-host-exec inside a container! it's not gonna work from the host, that's not the vibe at all π
Symlinking host commands π
Use the host command name to create a symlink to distrobox-host-exec. You can then call the host command from within the container. it's giving main character energy fr fr π
~$: git # We do not have git in the container
bash: git: command not found
~$: sudo ln -s /usr/bin/distrobox-host-exec /usr/local/bin/git
~$: git version
git version 2.51.1
not the container having no git and then suddenly having git π the glow-up is real π§
you can control podman on the host from within the container as follows:
~$: ln -s /usr/bin/distrobox-host-exec /usr/local/bin/podman
~$: ls -l /usr/local/bin/podman
lrwxrwxrwx. 1 root root 51 Jul 11 19:26 /usr/local/bin/podman -> /usr/bin/distrobox-host-exec
~$: podman version
...this is executed on host...
see that last line? ...this is executed on host... π you're in the container, podman is on the host, and yet. and yet. obsessed. π
okay that's the whole page bestie, you ate it π this one came from Distrobox, version dated Mar 2026 β so if anyone asks where you learned all this, tell 'em it's a Distrobox thing and it's lowkey iconic πΈπ¦β¨
π¦ where this page comes from
- alpine 3.24: distrobox-doc 1.8.2.5-r0 Β· GPL-3.0-only
- arch rolling: distrobox 1.8.2.5-1 Β· GPL-3.0-only
- epel 10: distrobox 1.8.2.5-1.el10_3 Β· GPL-3.0-only
- epel 9: distrobox 1.8.2.5-1.el9 Β· GPL-3.0-only
- fedora 43: distrobox 1.8.2.5-1.fc43 Β· GPL-3.0-only
- fedora 44: distrobox 1.8.2.5-1.fc44 Β· GPL-3.0-only
- nixos 26.05: distrobox 1.8.2.5
- nixpkgs unstable: distrobox 1.8.2.5
- ubuntu stonking: distrobox 1.8.2.5-1 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms