← 返回命令列表

Linux command

lxc-start 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Example

systemctl start lxc-net

Start

sudo lxc-start [container_name]

Example

sudo lxc-start [container_name] --foreground

Example

sudo lxc-start [container_name] -l DEBUG -o [path/to/logfile]

Example

lxc-start --help

说明

lxc-start starts a stopped Linux container. By default it runs in the background. Use foreground mode for debugging.

参数

-n, --name NAME
Container name
-F, --foreground
Run in foreground
-d, --daemon
Run as daemon (default)
-l, --logpriority LEVEL
Log priority (DEBUG, INFO, etc.)
-o, --logfile FILE
Log output file
-p, --pidfile FILE
PID file for daemon mode
-?, --help
Display help information

FAQ

What is the lxc-start command used for?

lxc-start starts a stopped Linux container. By default it runs in the background. Use foreground mode for debugging.

How do I run a basic lxc-start example?

Run `systemctl start lxc-net` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

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

Container name