shell

limactl shell

Execute shell in Lima

Synopsis

Execute shell in Lima

lima command is provided as an alias for limactl shell $LIMA_INSTANCE. $LIMA_INSTANCE defaults to “default”.

By default, the first ‘ssh’ executable found in the host’s PATH is used to connect to the Lima instance.
A custom ssh alias can be used instead by setting the $SSH environment variable.

Environment Variables:
--preserve-env: Propagates host environment variables to the guest instance.
Use LIMA_SHELLENV_BLOCK to specify variables to block (prefix with + to extend the default blocklist).
Use LIMA_SHELLENV_ALLOW to exempt specific variables from the blocklist.

Hint: try --debug to show the detailed logs, if it seems hanging (mostly due to some SSH issue).

limactl shell [flags] INSTANCE [COMMAND...]

Options

  -h, --help[=true|false]           help for shell
      --preserve-env[=true|false]   Propagate environment variables to the shell
      --reconnect[=true|false]      Reconnect to the SSH session
      --shell string                Shell interpreter, e.g. /bin/bash
      --start[=true|false]          Start the instance if it is not already running
      --sync string                 Copy a host directory to the guest and vice-versa upon exit
      --sync-exclude stringArray    Exclude pattern for --sync (can be specified multiple times)
      --workdir string              Working directory

Options inherited from parent commands

      --debug[=true|false]   Debug mode
      --log-format string    Set the logging format [text, json] (default "text")
      --log-level string     Set the logging level [trace, debug, info, warn, error]
      --tty[=true|false]     Enable TUI interactions such as opening an editor. Defaults to true when stdout is a terminal. Set to false for automation.
  -y, --yes[=true|false]     Alias of --tty=false

SEE ALSO

  • limactl - Lima: Linux virtual machines