lxc-stop(1)
π lxc-stop(1) β the page for putting your container to bed
okay so this is the manual page for lxc-stop, one of the lxc family of commands (lxc(7) and friends, iykyk). It's giving "time to say goodnight to the app running inside your container" energy. Let's go. π
β¨ NAME β¨
lxc-stop β stop the application running inside a container
πΈ SYNOPSIS πΈ
lxc-stop {-n name} [-W] [-r] [-t timeout] [-k] [--nokill] [--nolock]
π¦ DESCRIPTION π¦
So what does lxc-stop actually do? It reboots, cleanly shuts down, or kills all the processes inside the container. Main character behavior honestly. π
By default, it requests a clean shutdown of the container by sending lxc.signal.halt (which defaults to SIGPWR) to the container's init process, then waits up to 60 seconds for the container to exit, and then returns. Very patient, very demure. π§
If the container fails to cleanly exit in those 60 seconds, it gets sent the lxc.signal.stop (defaults to SIGKILL) to force it to shut down. Like, we asked nicely, bestie. π
A request to reboot will send the lxc.signal.reboot (defaults to SIGINT) to the container's init process.
The [-W], [-r], [-k] and [--nokill] options specify the action to perform. [-W] indicates that after performing the specified action, lxc-stop should immediately exit, while [-t TIMEOUT] specifies the maximum amount of time to wait for the container to complete the shutdown or reboot.
π OPTIONS π
-r,--rebootβ Request a reboot of the container. π-k,--killβ Rather than requesting a clean shutdown of the container, explicitly kill all tasks in the container. This is the legacylxc-stopbehavior. No cap, it's the old-school way. π₯--nokillβ Only request a clean shutdown, do not kill the container tasks if the clean shutdown fails. It's giving "no backup plan, we trust you." π--nolockβ This option avoids the use of any of the APIlxclocking, and should only be used iflxc-stopis hanging due to a bad system state. β οΈ Like, genuinely only then β it's the "the lock is broken so we skip the lock" option.-W,--nowaitβ Simply perform the requestion action (reboot, shutdown, or hard kill) and exit. Don't stick around, don't overthink it. πββοΈ-t,--timeout TIMEOUTβ WaitTIMEOUTseconds before hard-stopping the container. β³
β EXIT VALUE β
0β The container was successfully stopped. slay. β1β An error occurred while stopping the container. π2β The specified container exists but was not running. like, it's already asleep bestie π
π DIAGNOSTIC π
- The container was not found β The specified container was not created before with the
lxc-createcommand. Girl, it doesn't exist yet. π
π«Ά SEE ALSO π«Ά
lxc(7), lxc-create(1), lxc-copy(1), lxc-destroy(1), lxc-start(1), lxc-stop(1), lxc-execute(1), lxc-console(1), lxc-monitor(1), lxc-wait(1), lxc-cgroup(1), lxc-ls(1), lxc-info(1), lxc-freeze(1), lxc-unfreeze(1), lxc-attach(1), lxc.conf(5)
and that's the whole page, bestie π this version of lxc-stop(1) is dated 2026-05-01 β write it down, screenshot it, whatever, it's iconic. bye! πΈβ¨
π¦ where this page comes from
- alpine 3.24: lxc-doc 7.0.0-r0 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms