LinuxCommandLibrary

lxc

TLDR

List containers

$ lxc list [match_string]
copy
List images
$ lxc image list [remote:][match_string]
copy
Create container from image
$ lxc init [remote:]image [container]
copy
Start container
$ lxc start [remote:]container
copy
Stop container
$ lxc stop [remote:]container
copy
Show container info
$ lxc info [remote:]container
copy
Take snapshot
$ lxc snapshot [remote:]container [snapshot_name]
copy
Execute command in container
$ lxc exec [remote:]container [command]
copy

SYNOPSIS

lxc command [options]

DESCRIPTION

lxc manages Linux containers using the LXD REST API. It provides a user-friendly interface for creating, managing, and interacting with system containers and virtual machines.

PARAMETERS

list

List containers
image list
List available images
init
Create container from image
start
Start container
stop
Stop container
info
Show container details
snapshot
Create container snapshot
exec
Execute command in container
delete
Delete container
copy
Copy container

CAVEATS

Requires LXD daemon running. Container names can be prefixed with remote server names for cluster operations.

SEE ALSO

Copied to clipboard