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 legacy lxc-stop behavior. 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 API lxc locking, and should only be used if lxc-stop is 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 β€” Wait TIMEOUT seconds 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-create command. 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