How to Quickly Set Up Ubuntu VMs with Multipass: A Step‑by‑Step Guide
This article introduces Multipass, a lightweight cross‑platform VM tool, and provides a complete walkthrough for installing the software, creating Ubuntu instances, managing their lifecycle, automating setup with cloud‑init, and summarizing its strengths and limitations.
Multipass
Multipass is a lightweight virtual‑machine command‑line tool that runs on Linux, Windows and macOS. It allows you to quickly create, manage and delete Ubuntu‑based VM instances.
Getting Started
Download and install Multipass for your operating system (example shown for Windows).
$ multipass versionCreate an Ubuntu VM
List available Ubuntu images with multipass find, then launch a new instance: $ multipass launch --name dg Check the VM details:
$ multipass exec dg -- lsb_release -dManaging the VM
View the list of instances, enter a shell, stop, start, delete and purge VMs using the corresponding multipass commands.
# List
$ multipass list
# Shell
$ multipass shell dg
# Stop
$ multipass stop dg
# Start
$ multipass start dg
# Delete
$ multipass delete dg
# Purge
$ multipass purge dgAutomation with cloud‑init
Initialize a VM with a cloud‑init configuration file to install packages automatically:
$ multipass launch --name ubuntu --cloud-init config.yamlExample config.yaml runs commands to install Node.js and the LeanCloud CLI.
Conclusion
Multipass provides a fast way to spin up Ubuntu environments for testing, small database clusters, or other Linux experiments. Its limitation is that it only supports Ubuntu images, as it is developed by Canonical.
Official site: https://multipass.run/
Documentation: https://multipass.run/docs/
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Su San Talks Tech
Su San, former staff at several leading tech companies, is a top creator on Juejin and a premium creator on CSDN, and runs the free coding practice site www.susan.net.cn.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
