2025-03-14 21:59:59 -06:00
|
|
|
# lxc-create
|
|
|
|
|
|
|
|
|
|
> Create linux containers.
|
2025-05-08 12:26:01 -06:00
|
|
|
> More information: <https://linuxcontainers.org/lxc/getting-started/>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Create a container interactively in `/var/lib/lxc/`:
|
|
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`sudo lxc-create {{[-n|--name]}} {{container_name}} {{[-t|--template]}} download`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Create a container in a target directory:
|
|
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`sudo lxc-create {{[-P|--lxcpath]}} {{/path/to/directory/}} {{[-n|--name]}} {{container_name}} {{[-t|--template]}} download`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Create a container passing options to a template:
|
|
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`sudo lxc-create {{[-n|--name]}} {{container_name}} {{[-t|--template]}} download -- {{[-d|--dist]}} {{distro-name}} {{[-r|--release]}} {{release-version}} {{[-a|--arch]}} {{arch}}`
|
2025-04-03 20:36:56 -06:00
|
|
|
|
|
|
|
|
- Display help:
|
|
|
|
|
|
|
|
|
|
`lxc-create {{[-?|--help]}}`
|