1DISTROBOX-ENTER(1)                User Manual               DISTROBOX-ENTER(1)
2
3
4

NAME

6              distrobox enter
7              distrobox-enter
8

DESCRIPTION

10       distrobox-enter  takes  care  of  entering  the container with the name
11       specified.  Default command executed is your SHELL, but you can specify
12       different  shells  or entire commands to execute.  If using it inside a
13       script, an application, or a service, you  can  specify  the  –headless
14       mode to disable tty and interactivity.
15

SYNOPSIS

17       distrobox enter
18
19              --name/-n:      name for the distrobox                      default: my-distrobox
20              --/-e:          end arguments execute the rest as command to execute at login   default: bash -l
21              --no-tty/-T:        do not instantiate a tty
22              --no-workdir/-nw:       always start the container from container's home directory
23              --additional-flags/-a:  additional flags to pass to the container manager command
24              --help/-h:      show this message
25              --root/-r:      launch podman/docker with root privileges. Note that if you need root this is the preferred
26                          way over "sudo distrobox" (note: if using a program other than 'sudo' for root privileges is necessary,
27                          specify it through the DBX_SUDO_PROGRAM env variable, or 'distrobox_sudo_program' config variable)
28              --dry-run/-d:       only print the container manager command generated
29              --verbose/-v:       show more verbosity
30              --version/-V:       show version
31

EXAMPLES

33              distrobox-enter --name fedora-toolbox-35 -- bash -l
34              distrobox-enter my-alpine-container -- sh -l
35              distrobox-enter --additional-flags "--preserve-fds" --name test -- bash -l
36              distrobox-enter --additional-flags "--env MY_VAR=value" --name test -- bash -l
37              MY_VAR=value distrobox-enter --additional-flags "--preserve-fds" --name test -- bash -l
38
39       You can also use environment variables to specify container manager and
40       container name:
41
42              DBX_CONTAINER_MANAGER="docker" DBX_CONTAINER_NAME=test-alpine distrobox-enter
43
44       Supported environment variables:
45
46              DBX_CONTAINER_NAME
47              DBX_CONTAINER_MANAGER
48              DBX_SKIP_WORKDIR
49              DBX_SUDO_PROGRAM
50
51       This is used to enter the distrobox itself.  Personally, I just  create
52       multiple  profiles in my gnome-terminal to have multiple distros acces‐
53       sible.
54
55       The --additional-flags or -a is useful to modify default  command  when
56       executing in the container.  For example:
57
58              distrobox enter -n dev-arch --additional-flags "--env my_var=test" -- printenv &| grep my_var
59              my_var=test
60
61       This is possible also using normal env variables:
62
63              my_var=test distrobox enter -n dev-arch --additional-flags -- printenv &| grep my_var
64              my_var=test
65
66       If  you’d like to enter a rootful container having distrobox use a pro‐
67       gram other than `sudo' to run podman/docker as root, such  as  `pkexec'
68       or  `doas',  you  may  specify it with the DBX_SUDO_PROGRAM environment
69       variable.  For example, to use `doas' to enter a rootful container:
70
71              DBX_SUDO_PROGRAM="doas" distrobox enter -n container --root
72
73       Additionally, in one of the config file paths that distrobox  supports,
74       such  as  ~/.distroboxrc,  you  can  also append the line distrobox_su‐
75       do_program="doas" (for example) to always run  distrobox  commands  in‐
76       volving rootful containers using `doas'.
77
78
79
80Distrobox                          Dec 2022                 DISTROBOX-ENTER(1)
Impressum