← 返回命令列表

Linux command

lxc-stop 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Stop

sudo lxc-stop [container_name]

Example

lxc-stop --help

说明

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

参数

-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

FAQ

What is the lxc-stop command used for?

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

How do I run a basic lxc-stop example?

Run `sudo lxc-stop [container_name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -n, --name NAME do in lxc-stop?

Container name