LinuxCommandLibrary

lxc-stop

stops a running Linux container

TLDR

Stop container

$ sudo lxc-stop [container_name]
copy
Display help
$ lxc-stop --help
copy

SYNOPSIS

lxc-stop -n name [options]

DESCRIPTION

lxc-stop stops a running Linux container. It sends SIGPWR and SIGKILL signals to gracefully shut down the container's init process.

PARAMETERS

-n, --name NAME

Container name
-k, --kill
Kill container immediately (SIGKILL)
-W, --nowait
Don't wait for shutdown
-t, --timeout SECONDS
Shutdown timeout before kill
-r, --reboot
Reboot instead of stop
-?, --help
Display help information

CAVEATS

Requires root privileges. Graceful shutdown may take time. Use --kill for immediate termination.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community