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 (default 0)
  • --mode="auto" β€” override the terminal mode (auto, interactive or non-interactive)
  • --user=0 β€” user ID to run the command as (default 0)

πŸ‘‘ 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 --help to 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 by spf13/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