lxc-start(1)
β¨ lxc-start(1) β the LXC glow-up guide β¨
okay so bestie, you're looking at the lxc-start page from the lxc manual set, and honestly? it's a whole vibe. this is the command that actually boots your container, like pressing play on your fave playlist. let's get into it π
πΈ NAME πΈ
lxc-start β run an application inside a container. yes, that's the whole thing, and it ate π
π SYNOPSIS π
lxc-start {-n name} [-f config_file] [-c console_device] [-L
console_logfile] [-d] [-F] [-p pid_file] [-s KEY=VAL] [-C]
[--share-[net|ipc|uts] name|pid] [command]
look at all those little flags, they're giving main character energy fr fr π¦
π« DESCRIPTION π«
so lxc-start runs the command you specify inside the container you picked with name. that's it, that's the job, and it slays at it π«Ά
it sets everything up according to the config you already defined with the lxc-create command, or per the config file parameter. if there's literally no configuration defined? no worries, it just uses the default isolation. lowkey chill of it ngl β¨
and if you don't specify a command at all, lxc-start will use the command defined in lxc.init.cmd β or, if that's not set either, the default "/sbin/init" command to run a system container. icon behavior π
π₯ OPTIONS π₯
-d,--daemonβ run the container as a daemon. heads up bestie: since the container has no more tty, if an error happens nothing will be displayed π the log file is your bestie for checking the error. (this is the default mode btw)-F,--foregroundβ run the container in the foreground. in this mode the container console gets attached to the current tty, and signals are routed directly to the container. very hands-on, very demure π-p,--pidfilepid_file β create a file with the process id. cute little receipt of your container's existence π-f,--rcfileconfig_file β specify the configuration file that configures the virtualization and isolation functionalities for the container.
and listen: this config file, if present, will be used even if there's already a config file chillin' in the previously created container (via lxc-create). it overrides, periodt β¨
-c,--consoleconsole_device β specify a device to use for the container's console, for example/dev/tty8. if you don't specify this option, the current terminal will be used β unless-dis specified. iykyk πΈ-L,--console-logconsole_logfile β specify a file to log the container's console output to. everything gets written down, no cap π-s,--defineKEY=VAL β assign value VAL to configuration variable KEY. this overrides any assignment done in config_file. override queen π-C,--close-all-fdsβ if any file descriptors are inherited, close them. and if you don't specify this option? thenlxc-startwill exit with failure instead π note:--daemonimplies--close-all-fds.--share-netname|pid β inherit a network namespace from a name container or a pid. the network namespace will continue to be managed by the original owner. the network configuration of the starting container is ignored and the up/down scripts won't be executed. sharing is caring but read the fine print bestie π¦--share-ipcname|pid β inherit an IPC namespace from a name container or a pid.--share-utsname|pid β inherit a UTS namespace from a name container or a pid. the starting LXC will not set the hostname β but the container OS may do it anyway π
π COMMON OPTIONS π
these options are common to most of the lxc commands, so learn 'em once and you're set forever π
-?,-h,--helpβ print a longer usage message than normal. when you need the full story π--usageβ give the usage message. short and sweet β-q,--quietβ mute on π-P,--lxcpath=PATHβ use an alternate container path. the default is/var/lib/lxc. know your home base π-o,--logfile=FILEβ output to an alternate log FILE. the default is no log. (yes, no log at all, choose your destiny) π-l,--logpriority=LEVELβ set log priority to LEVEL. the default log priority isERROR. possible values are:FATAL,ALERT,CRIT,WARN,ERROR,NOTICE,INFO,DEBUG,TRACE. a whole ladder of drama, fromFATALdown toTRACEπ₯
note that this option sets the priority of the events log in the alternate log file. it does not have an effect on the ERROR events log on stderr. read that twice bestie, it matters π
-n,--name=NAMEβ use container identifier NAME. the container identifier format is an alphanumeric string. no emoji in your container names, sorry π--rcfile=FILEβ specify the configuration file that configures the virtualization and isolation functionalities for the container.
same deal as before: this config file, if present, will be used even if there's already a config file in the previously created container (via lxc-create). β¨
--versionβ show the version number. gotta know which era of slay you're running π
π©Ί DIAGNOSTIC π©Ί
- the container is busy β the specified container is already running an application. you should stop it before you reuse this container, or just create a new one. don't fight it, just make a new one bestie π«Ά
π 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) β the whole friend group, go say hi π
and that's the page! this one's from the lxc source, version dated 2026-05-01 β go forth and start some containers, you've got this πβ¨
π¦ where this page comes from
- alpine 3.24: lxc-doc 7.0.0-r0 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms