2025-01-21 05:55:23 +03:00
|
|
|
# lxc-create
|
|
|
|
|
|
|
|
> Create linux containers.
|
2025-04-27 10:35:40 +03:00
|
|
|
> More information: <https://linuxcontainers.org/lxc/getting-started/>.
|
2025-01-21 05:55:23 +03:00
|
|
|
|
|
|
|
- Create a container interactively in `/var/lib/lxc/`:
|
|
|
|
|
2025-03-15 22:31:22 +02:00
|
|
|
`sudo lxc-create {{[-n|--name]}} {{container_name}} {{[-t|--template]}} download`
|
2025-01-21 05:55:23 +03:00
|
|
|
|
|
|
|
- Create a container in a target directory:
|
|
|
|
|
2025-03-15 22:31:22 +02:00
|
|
|
`sudo lxc-create {{[-P|--lxcpath]}} {{/path/to/directory/}} {{[-n|--name]}} {{container_name}} {{[-t|--template]}} download`
|
2025-01-21 05:55:23 +03:00
|
|
|
|
|
|
|
- Create a container passing options to a template:
|
|
|
|
|
2025-03-15 22:31:22 +02:00
|
|
|
`sudo lxc-create {{[-n|--name]}} {{container_name}} {{[-t|--template]}} download -- {{[-d|--dist]}} {{distro-name}} {{[-r|--release]}} {{release-version}} {{[-a|--arch]}} {{arch}}`
|
2025-03-26 00:36:41 +02:00
|
|
|
|
|
|
|
- Display help:
|
|
|
|
|
|
|
|
`lxc-create {{[-?|--help]}}`
|