lxc-ls(1)
π
lxc-ls β the container list command, bestie
Okay so picture this: you've got containers. Maybe a lot. Maybe too many. And you're like "girl, what is even ON this system right now?" That's lxc-ls, and she's about to give you the whole roster. This is the lxc-ls(1) manual page, rewritten so you actually enjoy reading it. No cap. π«Ά
β¨ NAME β¨
lxc-ls β list the containers existing on the system
Like, all of them. Or some of them. Depends on your flags. We'll get there. π¦
πΈ SYNOPSIS πΈ
lxc-ls [-1] [--active] [--frozen] [--running] [--stopped] [--defined]
[-f] [-F format] [-g groups] [--nesting=NUM] [--filter=regex]
That's the whole vibe check in one block. Don't worry, we're breaking it down. π
π DESCRIPTION π
lxc-ls lists the containers existing on the system. That's it. That's the whole job. But she does it so well. Periodt. π₯
π OPTIONS π
Okay bestie, here's where it gets juicy. Every single flag, explained with love.
-1β Show one entry per line. (This is the default when/dev/stdoutisn't a tty, FYI. So like, if you're piping it somewhere, she already knows. Iconic.) β--activeβ List only active containers. And yes, that's the same as--frozen --runningtogether. Two moods, one flag. π«--frozenβ List only frozen containers. The ones justβ¦ chillin'. Literally. π₯Ά--runningβ List only running containers. The main characters. π--stoppedβ List only stopped containers. They're resting. Respect it. π΄--definedβ List only defined containers. They exist on paper, bestie. That counts. π-f,--fancyβ Use a fancy, column-based output. She ate and left no crumbs. π-F,--fancy-formatformat β Comma separated list of columns to show in the fancy output. The list of accepted and default fields is listed in--help. So like, go check--helpif you wanna know your options, babe. π-g,--groupsgroups β Comma separated list of groups the container must have to be displayed. And guess what? You can pass this parameter multiple times. Lowkey flexible. π§--nesting=NUMβ Show nested containers. The number of nesting levels to be shown can be specified by passing a number as argument. It's giving inception. π--filter=regexβ The regular expression passed tolxc-lswill 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. So you can just toss it in there, no announcement needed. π
π EXAMPLES π
Let's see her in action, shall we?
lxc-ls --fancy
List all the containers, listing one per line along with its name, state, ipv4 and ipv6 addresses. She's thorough. Obsessed. β¨
lxc-ls --active -1
List active containers and display the list in one column. Clean. Simple. Slay. π
π COMMON OPTIONS π
These options are common to most of lxc commands. So like, you'll see them everywhere. Learn them once, use them forever. π«Ά
-?,-h,--helpβ Print a longer usage message than normal. She's verbose and we love that. π¬--usageβ Give the usage message. Short and sweet. π-q,--quietβ Mute on. Shhh. π€«-P,--lxcpath=PATHβ Use an alternate container path. The default is/var/lib/lxc. Home sweet home. π-o,--logfile=FILEβ Output to an alternate log FILE. The default is no log. So if you want receipts, you gotta ask for them. π-l,--logpriority=LEVELβ Set log priority to LEVEL. The default log priority isERROR. 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. (Yes, "it do not" β that's the original wording, bestie, I don't make the rules. π)
-n,--name=NAMEβ Use container identifier NAME. The container identifier format is an alphanumeric string. So like, letters and numbers. Keep it cute. π€--rcfile=FILEβ 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). So yeah, she will override. Be aware. β οΈ
--versionβ Show the version number. Flex. πͺ
π¦ SEE ALSO π¦
The whole friend group, honestly. Go check them out:
lxc(7)lxc-create(1)lxc-copy(1)lxc-destroy(1)lxc-start(1)lxc-stop(1)lxc-execute(1)lxc-console(1)lxc-monitor(1)lxc-wait(1)lxc-cgroup(1)lxc-ls(1)lxc-info(1)lxc-freeze(1)lxc-unfreeze(1)lxc-attach(1)lxc.conf(5)
π 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. Three glow-ups. We love a evolution arc. π±βπ³
And that's the tea, bestie! π΅ This page is from lxc-ls(1), dated 2026-05-01. Go list those containers and live your truth. πβ¨
π¦ where this page comes from
- alpine 3.24: lxc-doc 7.0.0-r0 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms