Skip to main content

Your submission was sent successfully! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates from Canonical and upcoming events where you can meet our team.Close

Thank you for contacting us. A member of our team will be in touch shortly. Close

`multipass alias` command

See also: Alias, How to use 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 command, a new alias is defined as running the command on the given instance.

By default, if the host folder where the alias is being executed is mounted on the instance, the instance’s working directory is changed to the mounted directory. This behaviour can be avoided by defining the alias with the option --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.

Options:
  -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

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

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

Last updated 3 months ago. Help improve this document in the forum.