Skip site navigation (1)Skip section navigation (2)

FreeBSD Man Pages

Man Page or Keyword Search:
Man Architecture
Apropos Keyword Search (all sections) Output format
home | help
JEXEC(8)                FreeBSD System Manager's Manual               JEXEC(8)

NAME
     jexec - execute a command inside an existing jail

SYNOPSIS
     jexec [-u username | -U username] [-n jailname] jid command ...

DESCRIPTION
     The jexec utility executes command inside the jail identified by either
     jailname or jid or both.

     If the jail cannot be identified uniquely by the given parameters, an
     error message is printed.  jexec will also check the state of the jail
     (once supported) to be ALIVE and ignore jails in other states.  The
     mandatory argument jid is the unique jail identifier as given by jls(8).
     In case you only want to match on other criteria, give an empty string.

     The following options are available:

     -n jailname
             The name of the jail, if given upon creation of the jail.  This
             is not the hostname of the jail.

     -u username
             The user name from host environment as whom the command should
             run.

     -U username
             The user name from jailed environment as whom the command should
             run.

SEE ALSO
     jail_attach(2), jail(8), jls(8)

HISTORY
     The jexec utility was added in FreeBSD 5.1.

BUGS
     If the jail is not identified by jid there is a possible race in between
     the lookup of the jail and executing the command inside the jail.  Giving
     a jid has a similar race as another process can stop the jail and start
     another one after the user looked up the jid.

FreeBSD 11.0-PRERELEASE        November 29, 2008       FreeBSD 11.0-PRERELEASE

NAME | SYNOPSIS | DESCRIPTION | SEE ALSO | HISTORY | BUGS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=jexec&sektion=8&manpath=FreeBSD+7.2-RELEASE>

home | help