docs

ix

ix shell

Open a shell in a VM

Usage: ix shell [OPTIONS] <VM> [COMMAND]...

Open a shell in a VM.

An interactive process inside the guest. For output that already happened, use ix logs.

Interactive by default; when stdout is not a TTY or with --noninteractive, the given command is streamed instead.

arguments

  • <VM> VM name from ix ls
  • <COMMAND> Command to run instead of the default shell. Runs in an interactive terminal by default (e.g. ix shell vm -- sh); pass --noninteractive for a one-off streamed command like ix shell vm --noninteractive -- uname -a

options

  • -l, --list <LIST> List this VM's open console sessions and exit, instead of opening one. Each ix shell creates a fresh session; use this to see what is already running before attaching with --attach default: false
  • -a, --attach <SESSION_ID> Attach to an existing console session by id (from --list) instead of creating a new one. Plain ix shell always creates a new session; attaching is an explicit choice
  • --noninteractive <NONINTERACTIVE> Run the command without a terminal: stream its stdout/stderr and exit with its status, instead of opening an interactive PTY. Has no stdin. Requires a command, e.g. ix shell vm --noninteractive -- uname -a default: false
  • --message-format <MESSAGE_FORMAT> Error format one of: human, short, json default: human