2022-06-22 08:47:30 +02:00
|
|
|
<!-- markdownlint-disable MD010 MD036 -->
|
|
|
|
|
# NAME
|
|
|
|
|
|
|
|
|
|
distrobox-host-exec
|
|
|
|
|
|
|
|
|
|
# DESCRIPTION
|
2022-05-25 13:14:44 +02:00
|
|
|
|
|
|
|
|
distrobox-host-exec lets one execute command on the host, while inside of a container.
|
|
|
|
|
|
2023-03-09 18:52:08 +01:00
|
|
|
Under the hood, distrobox-host-exec uses `host-spawn` a project that lets us
|
2022-08-17 17:24:23 +02:00
|
|
|
execute commands back on the host.
|
|
|
|
|
If the tool is not found the user will be prompted to install it.
|
2022-05-25 13:14:44 +02:00
|
|
|
|
2022-06-22 08:47:30 +02:00
|
|
|
# SYNOPSIS
|
|
|
|
|
|
2022-05-25 13:14:44 +02:00
|
|
|
Just pass to "distrobox-host-exec" any command and all its arguments, if any.
|
|
|
|
|
|
2022-06-22 08:47:30 +02:00
|
|
|
--help/-h: show this message
|
|
|
|
|
--verbose/-v: show more verbosity
|
|
|
|
|
--version/-V: show version
|
2023-06-17 09:02:18 +02:00
|
|
|
--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.
|
2022-06-22 08:47:30 +02:00
|
|
|
|
2022-07-11 20:24:10 +02:00
|
|
|
If no command is provided, it will execute "$SHELL".
|
|
|
|
|
|
|
|
|
|
Alternatively, use symlinks to make `distrobox-host-exec` execute as that command:
|
|
|
|
|
|
2022-07-11 21:14:21 +02:00
|
|
|
~$: 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...
|
2022-05-25 13:14:44 +02:00
|
|
|
|
2022-06-22 08:47:30 +02:00
|
|
|
# EXAMPLES
|
2022-05-25 13:14:44 +02:00
|
|
|
|
|
|
|
|
distrobox-host-exec ls
|
|
|
|
|
distrobox-host-exec bash -l
|
|
|
|
|
distrobox-host-exec flatpak run org.mozilla.firefox
|
|
|
|
|
distrobox-host-exec podman ps -a
|