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 prefer` command

See also: Alias, How to use command aliases

The prefer command, introduced in Multipass release 1.11.0, is used to switch alias contexts. It accepts a single argument, specifying the name of the context to switch to.

For example, the command multipass prefer secondary makes secondary the current context. If the given context does not exist, Multipass creates it.

Subsequent calls to alias , unalias and running any aliases from the command line will use the aliases defined in the given context.


The full multipass help prefer output explains the available options:

Usage: multipass prefer [options] <name>
Switch the current alias context. If it does not exist, create it before switching.

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.

Arguments:
  name           Name of the context to switch to

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.