# lxc-ls

## NAME



           lxc-ls - list the containers existing on the system
    


## SYNOPSIS



           **lxc-ls**[-1] [--active] [--frozen] [--running] [--stopped]
                  [--defined] [-f] [-F _format_] [-g _groups_] [--nesting=_NUM_]
                  [--filter=_regex_]
    


## DESCRIPTION



           **lxc-ls** list the containers existing on the system.
    


## OPTIONS



           **-1** Show one entry per line. (default when /dev/stdout isn't a
                  tty)
    
           **--active**
                  List only active containers (same as --frozen --running).
    
           **--frozen**
                  List only frozen containers.
    
           **--running**
                  List only running containers.
    
           **--stopped**
                  List only stopped containers.
    
           **--defined**
                  List only defined containers.
    
           **-f,--fancy**
                  Use a fancy, column-based output.
    
           **-F,--fancy-format** _format_
                  Comma separated list of columns to show in the fancy out‐
                  put.  The list of accepted and default fields is listed in
                  --help.
    
           **-g,--groups** _groups_
                  Comma separated list of groups the container must have to
                  be displayed.  The parameter may be passed multiple times.
    
           **--nesting=**_NUM_
                  Show nested containers. The number of nesting levels to be
                  shown can be specified by passing a number as argument.
    
           **--filter=**_regex_
                  The regular expression passed to **lxc-ls** will be applied to
                  the container name. The format is a POSIX extended regular
                  expression. It can also be given as additional argument
                  without explicitly using **--filter**.
    


## EXAMPLES



           lxc-ls --fancy
                  list all the containers, listing one per line along with
                  its name, state, ipv4 and ipv6 addresses.
    
           lxc-ls --active -1
                  list active containers and display the list in one column.
    


## 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.
    


* * *