.nh .TH "LXD - Command line client" "1" "Apr 2024" "Auto generated by spf13/cobra" "" .SH NAME .PP lxc-exec - Execute commands in instances .SH SYNOPSIS .PP \fBlxc exec [:] [flags] [--] \fP .SH DESCRIPTION .PP Description: Execute commands in instances .PP The command is executed directly using exec, so there is no shell and shell patterns (variables, file redirects, ...) won't be understood. If you need a shell environment you need to execute the shell executable, passing the shell commands as arguments, for example: .EX lxc exec -- sh -c "cd /tmp && pwd" .EE .PP Mode defaults to non-interactive, interactive mode is selected if both stdin AND stdout are terminals (stderr is ignored). .SH OPTIONS .PP \fB--cwd\fP="" Directory to run the command in (default /root)`` .PP \fB-n\fP, \fB--disable-stdin\fP[=false] Disable stdin (reads from /dev/null) .PP \fB--env\fP=[] Environment variable to set (e.g. HOME=/home/foo)`` .PP \fB-t\fP, \fB--force-interactive\fP[=false] Force pseudo-terminal allocation .PP \fB-T\fP, \fB--force-noninteractive\fP[=false] Disable pseudo-terminal allocation .PP \fB--group\fP=0 Group ID to run the command as (default 0)`` .PP \fB--mode\fP="auto" Override the terminal mode (auto, interactive or non-interactive)`` .PP \fB--user\fP=0 User ID to run the command as (default 0)`` .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB--debug\fP[=false] Show all debug messages .PP \fB--force-local\fP[=false] Force using the local unix socket .PP \fB-h\fP, \fB--help\fP[=false] Print help .PP \fB--project\fP="" Override the source project`` .PP \fB-q\fP, \fB--quiet\fP[=false] Don't show progress information .PP \fB--sub-commands\fP[=false] Use with help or --help to view sub-commands .PP \fB-v\fP, \fB--verbose\fP[=false] Show all information messages .PP \fB--version\fP[=false] Print version number .SH SEE ALSO .PP \fBlxc(1)\fP .SH HISTORY .PP 11-Apr-2024 Auto generated by spf13/cobra