INCUS.EXEC(1)
π incus-exec β bestie's guide to running commands inside instances
okay so real talk, this one lives in the Incus - Command line client(1) manual, and it's the page you want when you're like "I need this command to run inside that instance, not on my poor little host machine." it's giving puppet-master energy. let's go π
β¨ NAME β¨
incus-exec β Execute commands in instances
π¦ SYNOPSIS π¦
incus exec [:] [flags] [--] ...
πΈ DESCRIPTION πΈ
Description: Execute commands in instances. periodt.
okay so here's the tea, and it's important tea: the command gets executed directly using exec, so there is no shell and shell patterns (variables, file redirects, ...) won't be understood. like, at all. she's not doing that for you. π
so if you actually need a shell environment, bestie, you have to execute the shell executable yourself and pass the shell commands as arguments. for example:
incus exec <instance> -- sh -c "cd /tmp && pwd"
mode defaults to non-interactive, and interactive mode gets selected if both stdin AND stdout are terminals (stderr is ignored β she said what she said π).
β¨ OPTIONS β¨
--cwd=""β directory to run the command in (default/root)-n,--disable-stdin[=false]β disable stdin (reads from/dev/null)--env=[]β environment variable to set (e.g.HOME=/home/foo)-t,--force-interactive[=false]β force pseudo-terminal allocation-T,--force-noninteractive[=false]β disable pseudo-terminal allocation--group=0β group ID to run the command as (default0)--mode="auto"β override the terminal mode (auto,interactiveornon-interactive)--user=0β user ID to run the command as (default0)
π OPTIONS INHERITED FROM PARENT COMMANDS π
these are the family traits she got from her parent command, and honestly, iconic:
--debug[=false]β show all debug messages--explain[=false]β if the command is valid, explain its parsed arguments instead of running it--force-local[=false]β force using the local unix socket-h,--help[=false]β print help--project=""β override the source project-q,--quiet[=false]β don't show progress information--sub-commands[=false]β use with help or--helpto view sub-commands-v,--verbose[=false]β show all information messages--version[=false]β print version number
π EXAMPLE π
incus exec c1 bash
run the "bash" command in instance "c1" π«Ά
incus exec c1 -- ls -lh /
run the "ls -lh /" command in instance "c1" β¨
π SEE ALSO π
π HISTORY π
24-Sep-2026β auto generated byspf13/cobra
and that's the whole page, bestie π this little writeup was auto generated by spf13/cobra, dated Sep 2026, and it's chillin' inside the Incus - Command line client(1) manual. no cap, go run something inside an instance, you've got this πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: incus-client 7.0.1-5 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms