# lxc-start

## NAME



           lxc-start - run an application inside a container.
    


## SYNOPSIS



           **lxc-start**{-n _name_} [-f _config_file_] [-c _console_device_] [-L
                     _console_logfile_] [-d] [-F] [-p _pid_file_] [-s KEY=VAL]
                     [-C] [--share-[net|ipc|uts] _name|pid_] [command]
    


## DESCRIPTION



           **lxc-start** runs  the specified _command_ inside the container speci‐
           fied by _name_.
    
           It will setup the container according to the configuration  previ‐
           ously  defined  with the lxc-create command or with the configura‐
           tion file parameter.  If no configuration is defined, the  default
           isolation is used.
    
           If no command is specified, **lxc-start** will use the command defined
           in lxc.init.cmd or if not set, the default **"/sbin/init"** command to
           run a system container.
    


## OPTIONS



           **-d, --daemon**
                  Run the container as a daemon. As the container has no more
                  tty, if an error occurs nothing will be displayed, the log
                  file can be used to check the error. (This is the default
                  mode)
    
           **-F, --foreground**
                  Run the container in the foreground. In this mode, the con‐
                  tainer console will be attached to the current tty and sig‐
                  nals will be routed directly to the container.
    
           **-p, --pidfile** _pid_file_
                  Create a file with the process id.
    
           **-f, --rcfile** _config_file_
                  Specify the configuration file to configure the virtualiza‐
                  tion and isolation functionalities for the container.
    
                  This configuration file if present will be used even if
                  there is already a configuration file present in the previ‐
                  ously created container (via lxc-create).
    
           **-c, --console** _console_device_
                  Specify a device to use for the container's console, for
                  example /dev/tty8. If this option is not specified the cur‐
                  rent terminal will be used unless **-d** is specified.
    
           **-L, --console-log** _console_logfile_
                  Specify a file to log the container's console output to.
    
           **-s, --define** _KEY=VAL_
                  Assign value _VAL_ to configuration variable _KEY_. This over‐
                  rides any assignment done in _config_file_.
    
           **-C, --close-all-fds**
                  If any file descriptors are inherited, close them. If this
                  option is not specified, then **lxc-start** will exit with
                  failure instead. Note: _--daemon_ implies _--close-all-fds_.
    
           **--share-net** _name|pid_
                  Inherit a network namespace from a _name_ container or a _pid_.
                  The network namespace will continue to be managed by the
                  original owner. The network configuration of the starting
                  container is ignored and the up/down scripts won't be exe‐
                  cuted.
    
           **--share-ipc** _name|pid_
                  Inherit an IPC namespace from a _name_ container or a _pid_.
    
           **--share-uts** _name|pid_
                  Inherit a UTS namespace from a _name_ container or a _pid_. The
                  starting LXC will not set the hostname, but the container
                  OS may do it anyway.
    


## COMMON OPTIONS



           These options are common to most of lxc commands.
    
           **-?, -h, --help**
                  Print a longer usage message than normal.
    
           **--usage**
                  Give the usage message
    
           **-q, --quiet**
                  mute on
    
           **-P, --lxcpath=**_PATH_
                  Use an alternate container path. The default is
                  /var/lib/lxc.
    
           **-o, --logfile=**_FILE_
                  Output to an alternate log _FILE_. The default is no log.
    
           **-l, --logpriority=**_LEVEL_
                  Set log priority to _LEVEL_. The default log priority is ER‐
                  ROR. Possible values are : FATAL, ALERT, CRIT, WARN, ERROR,
                  NOTICE, INFO, DEBUG, TRACE.
    
                  Note that this option is setting the priority of the events
                  log in the alternate log file. It do not have effect on the
                  ERROR events log on stderr.
    
           **-n, --name=**_NAME_
                  Use container identifier _NAME_.  The container identifier
                  format is an alphanumeric string.
    
           **--rcfile=**_FILE_
                  Specify the configuration file to configure the virtualiza‐
                  tion and isolation functionalities for the container.
    
                  This configuration file if present will be used even if
                  there is already a configuration file present in the previ‐
                  ously created container (via lxc-create).
    
           **--version**
                  Show the version number.
    


## DIAGNOSTIC



           The container is busy
                  The specified container is already running an application.
                  You should stop it before reuse this container or create a
                  new one.
    


* * *