LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

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

INSTALL

sudo apt install lxc
copy
sudo dnf install lxc
copy
sudo pacman -S lxc
copy
sudo apk add lxc
copy
sudo zypper install lxc
copy
brew install lxc
copy
nix profile install nixpkgs#lxc
copy

CAVEATS

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

SEE ALSO

Copied to clipboard
Kai