.\" -*- coding: UTF-8 -*-
.if \n(.g .ds T< \\FC
.if \n(.g .ds T> \\F[\n[.fam]]
.de URL
\\$2 \(la\\$1\(ra\\$3
..
.if \n(.g .mso www.tmac
.TH lxc-ls 1 2025-08-26 "" ""
.SH NAME
lxc-ls \- list the containers existing on the system 
.SH SYNOPSIS
'nh
.fi
.ad l
\fBlxc-ls\fR \kx
.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
'in \n(.iu+\nxu
[-1] [--active] [--frozen] [--running] [--stopped] [--defined] [-f] [-F \fIformat\fR] [-g \fIgroups\fR] [--nesting=\fINUM\fR] [--filter=\fIregex\fR]
'in \n(.iu-\nxu
.ad b
'hy
.SH DESCRIPTION
\fBlxc-ls\fR list the containers existing on the
system.
.SH OPTIONS
.TP 
\*(T<\fB\-1\fR\*(T> 
Show one entry per line. (default when /dev/stdout isn't a tty)
.TP 
\*(T<\fB\-\-active\fR\*(T> 
List only active containers (same as --frozen --running).
.TP 
\*(T<\fB\-\-frozen\fR\*(T> 
List only frozen containers.
.TP 
\*(T<\fB\-\-running\fR\*(T> 
List only running containers.
.TP 
\*(T<\fB\-\-stopped\fR\*(T> 
List only stopped containers.
.TP 
\*(T<\fB\-\-defined\fR\*(T> 
List only defined containers.
.TP 
\*(T<\fB\-f,\-\-fancy\fR\*(T> 
Use a fancy, column-based output.
.TP 
\*(T<\fB\-F,\-\-fancy\-format \fR\*(T>\fIformat\fR 
Comma separated list of columns to show in the fancy output.
The list of accepted and default fields is listed in --help.
.TP 
\*(T<\fB\-g,\-\-groups \fR\*(T>\fIgroups\fR 
Comma separated list of groups the container must have to be displayed.
The parameter may be passed multiple times.
.TP 
\*(T<\fB\-\-nesting=\fR\*(T>\fINUM\fR 
Show nested containers. The number of nesting levels to be shown can
be specified by passing a number as argument.
.TP 
\*(T<\fB\-\-filter=\fR\*(T>\fIregex\fR 
The regular expression passed to \fBlxc-ls\fR 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 \*(T<\fB\-\-filter\fR\*(T>.
.SH EXAMPLES
.TP 
lxc-ls --fancy
list all the containers, listing one per line along with its
name, state, ipv4 and ipv6 addresses.
.TP 
lxc-ls --active -1
list active containers and display the list in one column.
.SH "COMMON OPTIONS"
These options are common to most of lxc commands.
.TP 
\*(T<\fB\-?, \-h, \-\-help\fR\*(T>
Print a longer usage message than normal.
.TP 
\*(T<\fB\-\-usage\fR\*(T>
Give the usage message
.TP 
\*(T<\fB\-q, \-\-quiet\fR\*(T>
mute on
.TP 
\*(T<\fB\-P, \-\-lxcpath=\fR\*(T>\fIPATH\fR
Use an alternate container path. The default is /var/lib/lxc.
.TP 
\*(T<\fB\-o, \-\-logfile=\fR\*(T>\fIFILE\fR
Output to an alternate log
\fIFILE\fR. The default is no log.
.TP 
\*(T<\fB\-l, \-\-logpriority=\fR\*(T>\fILEVEL\fR
Set log priority to
\fILEVEL\fR. The default log
priority is \*(T<ERROR\*(T>. Possible values are :
\*(T<FATAL\*(T>, \*(T<ALERT\*(T>,
\*(T<CRIT\*(T>,
\*(T<WARN\*(T>, \*(T<ERROR\*(T>,
\*(T<NOTICE\*(T>, \*(T<INFO\*(T>,
\*(T<DEBUG\*(T>, \*(T<TRACE\*(T>.

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.
.TP 
\*(T<\fB\-n, \-\-name=\fR\*(T>\fINAME\fR
Use container identifier \fINAME\fR.
The container identifier format is an alphanumeric string.
.TP 
\*(T<\fB\-\-rcfile=\fR\*(T>\fIFILE\fR
Specify the configuration file to configure the virtualization
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 previously created
container (via lxc-create).
.TP 
\*(T<\fB\-\-version\fR\*(T>
Show the version number.
.SH "SEE ALSO"
\fBlxc\fR(7),
\fBlxc-create\fR(1),
\fBlxc-copy\fR(1),
\fBlxc-destroy\fR(1),
\fBlxc-start\fR(1),
\fBlxc-stop\fR(1),
\fBlxc-execute\fR(1),
\fBlxc-console\fR(1),
\fBlxc-monitor\fR(1),
\fBlxc-wait\fR(1),
\fBlxc-cgroup\fR(1),
\fBlxc-ls\fR(1),
\fBlxc-info\fR(1),
\fBlxc-freeze\fR(1),
\fBlxc-unfreeze\fR(1),
\fBlxc-attach\fR(1),
\fBlxc.conf\fR(5)
.SH HISTORY
Written originally as a shell script by Daniel Lezcano and Serge Hallyn.
Later reimplemented and extended in Python by Stéphane Graber and then
reimplemented and extended in C by Christian Brauner.
