Quickly Spin Up Ubuntu VMs with Multipass on Any OS
This guide shows how to install Multipass on Windows, Linux, or macOS, use its commands to list, launch, inspect, and manage Ubuntu virtual machines, and automate setup with cloud‑init, offering a free, lightweight alternative to paid VM solutions.
Multipass Overview
While VMware is powerful, it requires a paid license; Multipass is a free, lightweight command‑line tool that runs on Linux, Windows, and macOS, allowing you to quickly create and manage Ubuntu virtual machines.
Installation
Download the appropriate installer from the official Multipass website for your operating system (e.g., Windows) and install it.
Check Version
multipass versionCreate an Ubuntu VM
List available Ubuntu images: multipass find Launch a new instance named dg (default Ubuntu image): multipass launch --name dg Verify the VM is running:
multipass listInspect the VM
multipass info --allEnter the VM shell:
multipass shell dgControl the VM
Pause or start the VM:
# Pause
multipass stop dg
# Start
multipass start dgDelete or purge the VM:
# Delete
multipass delete dg
# Purge (release resources)
multipass purge dgAutomate with Cloud‑Init
Use the --cloud-init flag to apply an initialization script when launching a VM:
multipass launch --name ubuntu --cloud-init config.yamlExample config.yaml:
#cloud-config
runcmd:
- curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
- sudo apt-get install -y nodejs
- wget https://releases.leanapp.cn/leancloud/lean-cli/releases/download/v0.21.0/lean-cli-x64.deb
- sudo dpkg -i lean-cli-x64.debConclusion
Multipass enables rapid setup of Ubuntu environments for Linux experiments or small database clusters, though it currently supports only Ubuntu images because it is developed by Canonical.
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.
Java High-Performance Architecture
Sharing Java development articles and resources, including SSM architecture and the Spring ecosystem (Spring Boot, Spring Cloud, MyBatis, Dubbo, Docker), Zookeeper, Redis, architecture design, microservices, message queues, Git, etc.
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.
