1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-01 20:55:24 +02:00

lxc-{start, ls, create}: edit page (#15919)

This commit is contained in:
Managor 2025-03-15 22:31:22 +02:00 committed by GitHub
parent ed7e2c0446
commit 8d95e9859a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 3 deletions

View file

@ -5,12 +5,12 @@
- Create a container interactively in `/var/lib/lxc/`: - Create a container interactively in `/var/lib/lxc/`:
`sudo lxc-create {{[-n|--name]}} {{container}} {{[-t|--template]}} download` `sudo lxc-create {{[-n|--name]}} {{container_name}} {{[-t|--template]}} download`
- Create a container in a target directory: - Create a container in a target directory:
`sudo lxc-create {{[-P|--lxcpath]}} {{/path/to/directory/}} {{[-n|--name]}} {{container}} {{[-t|--template]}} download` `sudo lxc-create {{[-P|--lxcpath]}} {{/path/to/directory/}} {{[-n|--name]}} {{container_name}} {{[-t|--template]}} download`
- Create a container passing options to a template: - Create a container passing options to a template:
`sudo lxc-create {{[-n|--name]}} {{name}} {{[-t|--template]}} download -- {{[-d|--dist]}} {{distro-name}} {{[-r|--release]}} {{release-version}} {{[-a|--arch]}} {{arch}}` `sudo lxc-create {{[-n|--name]}} {{container_name}} {{[-t|--template]}} download -- {{[-d|--dist]}} {{distro-name}} {{[-r|--release]}} {{release-version}} {{[-a|--arch]}} {{arch}}`

View file

@ -3,6 +3,18 @@
> Start a container. > Start a container.
> More information: <https://linuxcontainers.org/lxc/getting-started/>. > More information: <https://linuxcontainers.org/lxc/getting-started/>.
- Start the lxc service:
`systemctl start lxc-net`
- Start a container: - Start a container:
`sudo lxc-start {{container_name}}` `sudo lxc-start {{container_name}}`
- Start a container in the foreground:
`sudo lxc-start {{container_name}} {{[-F|--foreground]]}`
- Exit out of a foreground container (run this in a separate terminal):
`sudo lxc-stop {{container_name}}`