← 返回命令列表

Linux command

lxc-ls 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Example

sudo lxc-ls

Example

sudo lxc-ls --active

Example

sudo lxc-ls --frozen

Example

sudo lxc-ls --stopped

Example

sudo lxc-ls --fancy

Example

sudo lxc-ls --fancy -F [NAME,STATE,IPV4,IPV6]

Example

sudo lxc-ls --filter ['^web.*']

说明

lxc-ls lists Linux containers on the system. It can filter by state and display detailed information in various formats.

参数

--active
Show running and frozen containers
--frozen
Show only frozen containers
--running
Show only running containers
--stopped
Show only stopped containers
-f, --fancy
Column-formatted detailed output
-F, --fancy-format COLS
Custom columns for fancy output
-1
One container per line
--filter _regex_
Filter container names by regular expression
-?, --help
Display help information

FAQ

What is the lxc-ls command used for?

lxc-ls lists Linux containers on the system. It can filter by state and display detailed information in various formats.

How do I run a basic lxc-ls example?

Run `sudo lxc-ls` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --active do in lxc-ls?

Show running and frozen containers