This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Usage

Starting a Linux instance

Run limactl start <INSTANCE> to create and start the first instance. The <INSTANCE> name defaults to “default”.

$ limactl start
? Creating an instance "default"  [Use arrows to move, type to filter]
> Proceed with the current configuration
  Open an editor to review or modify the current configuration
  Choose another template (docker, podman, archlinux, fedora, ...)
  Exit
...
INFO[0029] READY. Run `lima` to open the shell.

Choose Proceed with the current configuration, and wait until “READY” to be printed on the host terminal.

For automation, --tty=false flag can be used for disabling the interactive user interface.

Customization

To create an instance “default” from a template “docker”:

limactl create --name=default template:docker
limactl start default

See also the command reference:

Executing Linux commands

Run limactl shell <INSTANCE> <COMMAND> to launch <COMMAND> on the VM:

limactl shell default uname -a

See also the command reference:

For the “default” instance, this command can be shortened as lima <COMMAND>.

lima uname -a

The lima command also accepts the instance name as the environment variable $LIMA_INSTANCE.

Home directory

The host home directory is mounted as read-only on the following path by default:

  • /Users/${USER} (on macOS hosts)
  • /home/${USER} (on other hosts)

To make the host mount writable, run limactl start with --mount-writable. To disable the mount, limactl start with --mount-none or --plain.

The guest home directory exists independently on the following path:

  • /Users/${USER}.guest (on macOS guests)
  • /home/${USER}.guest (on other guests, since Lima v2.1)
  • /home/${USER}.linux (prior to Lima v2.1)

Shell completion

  • To enable bash completion, add source <(limactl completion bash) to ~/.bash_profile.
  • To enable zsh completion, see limactl completion zsh --help

1 - SSH

Instead of the limactl shell command, SSH can be used too:

$ limactl ls --format='{{.SSHConfigFile}}' default
/Users/example/.lima/default/ssh.config

$ ssh -F /Users/example/.lima/default/ssh.config lima-default

This is useful for interoperability with other software that expects the SSH connectivity.

Using SSH without additional options

Add the following line to your ~/.ssh/config:

Include ~/.lima/*/ssh.config

Then you can connect directly without specifying -F:

ssh lima-default

This configuration is notably useful for the Remote Development mode of Visual Studio Code.

Using SSH without a config file

If your SSH client does not support a config file, try specifying an equivalent of the following command:

ssh -p <PORT> -i ~/.lima/_config/user -o NoHostAuthenticationForLocalhost=yes 127.0.0.1

The port number can be inspected as follows:

limactl list --format '{{ .SSHLocalPort }}' default

See also .lima/default/ssh.config.

2 - Automatic Startup

⚡ RequirementLima >= 2.2

Lima instances can be registered to start automatically using limactl autostart. Two conditions are supported: login (start when the user logs in) and boot (start at system boot, before any user session). This replaces the older limactl start-at-login command, which is deprecated as of Lima v2.2.

Starting instances automatically

Use limactl autostart enable to register a Lima instance to start automatically. Use limactl autostart disable to remove the registration.

At user login (macOS and Linux)

# Register
limactl autostart enable default

# Unregister
limactl autostart disable default

On macOS this installs a LaunchAgent in ~/Library/LaunchAgents/. On Linux it installs a systemd user service. The instance starts in the background on the next login and on subsequent logins.

At system boot, without a user session (macOS only)

For headless macOS servers where no user session is expected, use --condition=boot. This installs a system LaunchDaemon that starts the instance at boot, before any user logs in.

# Register (prompts for sudo once)
limactl autostart enable --condition=boot k3s

# Unregister
limactl autostart disable k3s

The --user flag specifies which macOS user the instance runs as (default: $USER). The plist is installed to /Library/LaunchDaemons/io.lima-vm.daemon.<instance>.plist.

Lima < 2.2

Use limactl start-at-login (equivalent to limactl autostart enable --condition=login):

# Register
limactl start-at-login default

# Unregister
limactl start-at-login --enabled=false default

3 - Guest OS

3.1 - Linux

Linux is the default guest operating system.

See also

3.2 - macOS

⚡ RequirementLima >= 2.1, macOS, ARM

Running macOS guests is experimentally supported since Lima v2.1.

limactl start template:macos
limactl start template:homebrew-macos

The user password is randomly generated and stored in the ~/password file in the VM. Consider changing it after the first login.

limactl shell macos cat /Users/${USER}.guest/password

Difference from Linux guests

  • Password login is enabled
  • Password-less sudo is disabled, except for /sbin/shutdown -h now
  • Several features are not implemented yet. See Caveats below.

Caveats

  • No support for turning off the video display.
  • No support for automatic port forwarding. Use ssh -L to manually set up port forwarding, or, use the vzNAT network to access the guest by its IP.
  • No support for installing custom caCerts

3.3 - Windows

⚡ RequirementLima >= 2.2, QEMU

Running Windows guests is experimentally supported since Lima v2.2.

limactl start template:windows-2025

The user password is randomly generated and stored in the %USERPROFILE%\password.txt file in the VM. Consider changing it after the first login.

For Windows server 2025, Trusted Platform Module (TPM) is not required. However, there are some benefits if your VM has TPM. For example, you can install BitLocker disk encryption. In order to use TPM emulation on your VM, you need to install swtpm and set tpm: true on your yaml file.

Difference from Linux guests

  • Several features are not implemented yet. See Caveats below.

Caveats

  • Currently only Windows server 2025 (x86-64) is supported
  • QEMU is the only VM driver that supports Windows guests
  • Only plain mode is supported (no file mount, no dynamic port-forwarding)

3.4 - FreeBSD

⚡ RequirementLima >= 2.1

Running FreeBSD guests is experimentally supported since Lima v2.1.

limactl start template:freebsd-15
limactl start template:experimental/freebsd-16

Prerequisites:

  • QEMU
  • xorriso (on non-macOS hosts)

Difference from Linux guests

  • Several features are not implemented yet. See Caveats below.

Caveats

  • No support for automatic port forwarding. Use ssh -L to manually set up port forwarding.
  • No support for installing custom caCerts
  • And more

FreeBSD prior to 15.1

  • No support for mounting host directories. Use limactl cp or limactl shell --sync to share files with the host.