FreeBSD Manual Pages
APPJAIL-CMD(1) General Commands Manual APPJAIL-CMD(1) NAME appjail-cmd -- Execute commands in a jail SYNOPSIS appjail cmd all [-e] [-i file] target [args ...] appjail cmd chroot jail [command [args ...]] appjail cmd jaildir [command [args ...]] appjail cmd jexec jail [-l] [[-U username|-u username]] [command [args ...]] appjail cmd local jail [[-j|-r]] [command [args ...]] DESCRIPTION The appjail cmd utility executes commands on a jail or on the host. all is used to run the given command in all existing jails. If -e is specified, appjail cmd exits when the command returns a non-zero exit status. If -i is specified, the content of the file specified by this parameter is used as input for each call of the given command instead of /dev/null. target is any of the subcommands described below. chroot runs the given command in a chroot environment using the jail directory. jaildir is used to execute the given command from the host in the di- rectory where the jails are located. jexec is used to execute the given command in the given jail. Use the -l parameter to not run in a clean environment, or in other words, this is the opposite of the -l option specified in jexec(8). For a more de- tailed description of the -U and -u parameters, see jexec(8). local is used to execute the given command from the host. If -j is specified <default> the jail directory is used, but if -r is specified, the root directory of the jail is used. SHELL is used as the command to execute if no command or arguments are specified. EXIT STATUS The appjail cmd utility exits 0 on success, and >0 if an error occurs. It may fail for one of the following reasons: - EX_USAGE: The command was used incorrectly. - EX_NOINPUT: jail cannot be found. - EX_DATAERR: • jail is invalid. • An invalid subcommand was specified. EXAMPLES Example 1: Knowing the default directories used by each subcommand # appjail jail list -j jtest STATUS NAME TYPE VERSION PORTS NETWORK_IP4 UP jtest thin 14.0-RELEASE - - # appjail cmd chroot jtest pwd / # appjail cmd jaildir pwd /usr/local/appjail/jails # appjail cmd jexec jtest pwd /root # appjail cmd local jtest pwd /usr/local/appjail/jails/jtest/jail # appjail cmd local jtest -r pwd /usr/local/appjail/jails/jtest SEE ALSO sh(1) sysexits(3) environ(7) jexec(8) AUTHORS Jess Daniel Colmenares Oviedo <DtxdF@disroot.org> FreeBSD Ports 14.quarterly March 24, 2024 APPJAIL-CMD(1)
NAME | SYNOPSIS | DESCRIPTION | EXIT STATUS | EXAMPLES | SEE ALSO | AUTHORS
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=appjail-cmd&sektion=1&manpath=FreeBSD+Ports+14.3.quarterly>
