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/lilipod 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       Enter a distrobox named “example”
34
35              distrobox-enter example
36
37       Enter a distrobox specifying a command
38
39              distrobox-enter --name fedora-toolbox-35 -- bash -l
40              distrobox-enter my-alpine-container -- sh -l
41
42       Use additional podman/docker/lilipod flags while entering a distrobox
43
44              distrobox-enter --additional-flags "--preserve-fds" --name test -- bash -l
45
46       Specify additional environment variables while entering a distrobox
47
48              distrobox-enter --additional-flags "--env MY_VAR=value" --name test -- bash -l
49              MY_VAR=value distrobox-enter --additional-flags "--preserve-fds" --name test -- bash -l
50
51       You can also use environment variables to specify container manager and
52       container name:
53
54              DBX_CONTAINER_MANAGER="docker" DBX_CONTAINER_NAME=test-alpine distrobox-enter
55

ENVIRONMENT VARIABLES

57              DBX_CONTAINER_NAME
58              DBX_CONTAINER_MANAGER
59              DBX_SKIP_WORKDIR
60              DBX_SUDO_PROGRAM
61

EXTRA

63       This command is used to enter the distrobox itself.  Personally, I just
64       create  multiple profiles in my gnome-terminal to have multiple distros
65       accessible.
66
67       The --additional-flags or -a is useful to modify default  command  when
68       executing in the container.  For example:
69
70              distrobox enter -n dev-arch --additional-flags "--env my_var=test" -- printenv &| grep my_var
71              my_var=test
72
73       This is possible also using normal env variables:
74
75              my_var=test distrobox enter -n dev-arch --additional-flags -- printenv &| grep my_var
76              my_var=test
77
78       If  you’d like to enter a rootful container having distrobox use a pro‐
79       gram other than `sudo' to run podman/docker/lilipod as  root,  such  as
80       `pkexec'  or `doas', you may specify it with the DBX_SUDO_PROGRAM envi‐
81       ronment variable.  For example, to use `doas' to enter a  rootful  con‐
82       tainer:
83
84              DBX_SUDO_PROGRAM="doas" distrobox enter -n container --root
85
86       Additionally,  in one of the config file paths that distrobox supports,
87       such as ~/.distroboxrc, you can  also  append  the  line  distrobox_su‐
88       do_program="doas"  (for  example)  to always run distrobox commands in‐
89       volving rootful containers using `doas'.
90
91
92
93Distrobox                          Nov 2023                 DISTROBOX-ENTER(1)
Impressum