`multipass shell` command

The multipass shell command will open a shell prompt on an instance. Without any arguments, it will open the shell prompt of the primary instance. You can also pass the name of an existing instance. If the instance is not running, it will automatically be started. For the case of the primary instance, if it doesn’t exist yet, it will be created.

For the primary instance:

$ multipass shell
Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-72-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Thu Dec 19 16:11:12 EST 2019

  System load:  0.0               Processes:           87
  Usage of /:   24.0% of 4.67GB   Users logged in:     0
  Memory usage: 13%               IP address for ens4: 10.3.19.167
  Swap usage:   0%


11 packages can be updated.
3 updates are security updates.


Last login: Thu Dec 19 16:03:37 2019 from 10.3.19.1
ubuntu@primary:~$

For an instance named bionic:

$ multipass shell bionic
Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-72-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Thu Dec 19 16:11:12 EST 2019

  System load:  0.0               Processes:           87
  Usage of /:   24.0% of 4.67GB   Users logged in:     0
  Memory usage: 13%               IP address for ens4: 10.3.19.167
  Swap usage:   0%


11 packages can be updated.
3 updates are security updates.


Last login: Thu Dec 19 16:03:37 2019 from 10.3.19.1
ubuntu@bionic:~$

The full multipass shell --help output explains the available options:

$ multipass shell --help
Usage: multipass shell [options] [<name>]
Open a shell prompt on the 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.
  --timeout <timeout>  Maximum time, in seconds, to wait for the command to
                       complete. Note that some background operations may
                       continue beyond that. By default, instance startup and
                       initialization is limited to 5 minutes each.

Arguments:
  name                 Name of the instance to open a shell on. If omitted,
                       'primary' (the configured primary instance name) will be
                       assumed. If the instance is not running, an attempt is
                       made to start it (see `start` for more info).
1 Like

This page needs to be wikified and the shell tag needs to be added (since I can’t seem to add it :confused:)

2 Likes