1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/linux/lxc-create.md
Managor 611d2c9a04
linux*: refresh old pages part 2 (#16263)
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
Co-authored-by: Machiavelli <145562237+MachiavelliII@users.noreply.github.com>
2025-04-27 10:35:40 +03:00

705 B

lxc-create

Create linux containers. More information: https://linuxcontainers.org/lxc/getting-started/.

  • Create a container interactively in /var/lib/lxc/:

sudo lxc-create {{[-n|--name]}} {{container_name}} {{[-t|--template]}} download

  • Create a container in a target directory:

sudo lxc-create {{[-P|--lxcpath]}} {{/path/to/directory/}} {{[-n|--name]}} {{container_name}} {{[-t|--template]}} download

  • Create a container passing options to a template:

sudo lxc-create {{[-n|--name]}} {{container_name}} {{[-t|--template]}} download -- {{[-d|--dist]}} {{distro-name}} {{[-r|--release]}} {{release-version}} {{[-a|--arch]}} {{arch}}

  • Display help:

lxc-create {{[-?|--help]}}