Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pages/linux/lxc-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

- Create a container interactively in `/var/lib/lxc/`:

`sudo lxc-create --name {{container}} --template download`
`sudo lxc-create --name {{container_name}} --template download`

- Create a container in a target directory:

`sudo lxc-create --lxcpath {{/path/to/directory/}} --name {{container}} --template download`
`sudo lxc-create --lxcpath {{/path/to/directory/}} --name {{container_name}} --template download`

- Create a container passing options to a template:

`sudo lxc-create --name {{name}} --template download -- --dist {{distro-name}} --release {{release-version}} --arch {{arch}}`
`sudo lxc-create --name {{container_name}} --template download -- --dist {{distro-name}} --release {{release-version}} --arch {{arch}}`
2 changes: 1 addition & 1 deletion pages/linux/lxc-ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@

- List containers in a fancy, column-based output:

`sudo lxc-ls --fancy`
`sudo lxc-ls {{[-f|--fancy]}}`
12 changes: 12 additions & 0 deletions pages/linux/lxc-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
> Start a container.
> More information: <https://linuxcontainers.org/lxc/getting-started/>.

- Start the lxc service:

`systemctl start lxc-net`

- Start a container:

`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):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which one is better?


`sudo lxc-stop {{container_name}}`