`multipass alias` command

Errors or typos? Topics missing? Hard to read? Let us know or open an issue on GitHub.

See also: Alias, aliases, unalias, How to use instance command aliases

The alias command makes Multipass create a persistent alias to run commands on a given instance. Its syntax is the following:

multipass alias instance:command [name]

If name is omitted, the alias name defaults to command.

After running this, a new alias is defined as running the command on the given instance. By default, in the case the host folder on which executing an alias is mounted on the instance, the working directory on the instance is changed to the mounted directory. This behavior can be avoided when defining the alias with the parameter --no-map-working-directory.

The full multipass help alias output explains the available options:

Usage: multipass alias [options] <definition> [<name>]
Create an alias to be executed on a given instance.

  -h, --help                      Displays help on commandline options
  -v, --verbose                   Increase logging verbosity. Repeat the 'v' in
                                  the short option for more detail. Maximum
                                  verbosity is obtained with 4 (or more) v's,
                                  i.e. -vvvv.
  -n, --no-map-working-directory  Do not automatically map the host execution
                                  path to a mounted path

  definition                      Alias definition in the form
  name                            Name given to the alias being defined,
                                  defaults to <command>

Last updated a month ago. Help improve this document in the forum.