LinuxCommandLibrary

lxc-start

starts a stopped Linux container

TLDR

Start lxc service

$ systemctl start lxc-net
copy
Start container
$ sudo lxc-start [container_name]
copy
Start in foreground
$ sudo lxc-start [container_name] --foreground
copy
Start with debug logging
$ sudo lxc-start [container_name] -l DEBUG -o [path/to/logfile]
copy
Display help
$ lxc-start --help
copy

SYNOPSIS

lxc-start -n name [options]

DESCRIPTION

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

PARAMETERS

-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

CAVEATS

Requires root privileges. Container must exist and be stopped. Use lxc-stop to stop foreground containers.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community