Run Ubuntu with Multipass tool: Effortless Local Development
Effortless Local Development with Multipass: VMs for All (Windows, macOS, Linux) ๐
Developing applications often requires setting up specific environments to test and debug code. Virtual machines (VMs) are a popular solution, but managing them can be cumbersome. Enter Multipass, a user-friendly tool that simplifies local VM creation for developers on all major operating systems (Windows, macOS, and Linux).
What is Multipass? ๐
Developed by Canonical, Multipass is an open-source command-line tool that streamlines the creation and management of lightweight Ubuntu VMs. It leverages underlying hypervisors like Hyper-V (Windows), QEMU (macOS and Linux), and LXD (Linux) to provide a seamless experience.
Why Use Multipass? ๐
There are several advantages to using Multipass for local development:
- Simplicity: Multipass boasts a straightforward command-line interface, making it easy to create, start, stop, and delete VMs with just a few commands.
- Speed and Efficiency: Multipass VMs are lightweight and boot quickly, minimizing setup time and resource consumption.
- Pre-Configured Environments: Multipass offers pre-configured Ubuntu images with essential development tools pre-installed, saving you valuable setup time.
- Flexibility: You can customize your VM environment by installing additional packages or using a custom image.
- Cross-Platform Compatibility: Multipass works seamlessly on Windows, macOS, and Linux, allowing developers to maintain a consistent workflow regardless of their operating system.
Use Cases for Multipass ๐
- Testing and Development: Create isolated environments to test code on different Ubuntu versions without affecting your main system.
- Microservices Development: Run multiple interconnected containerized services within a single VM for simplified development and testing.
- Learning Ubuntu: Get hands-on experience with Ubuntu in a safe environment without modifying your main system.
- Continuous Integration/Continuous Delivery (CI/CD) Pipelines: Automate VM provisioning within your CI/CD pipeline for consistent testing environments.
Getting Started with Multipass ๐
Installation: Download and install Multipass from the official website ( https://multipass.run/docs ):
- Windows: Download the installer and follow the on-screen instructions.
- macOS: Use Homebrew (
brew install multipass
) or download the pre-built binary. - Linux: Follow the distribution-specific installation instructions provided on the website.
Create a VM: Open a terminal and run the following command, replacing
name
with your desired VM name:multipass launch name
Access the VM: Once created, you can access the VM’s terminal using:
multipass shell name
Manage VMs: Use commands like
multipass list
,multipass stop name
, andmultipass delete name
to manage your VMs.
Beyond the Basics ๐
- Pre-Configured Images: Multipass offers various pre-configured images beyond Ubuntu, including Fedora and Debian. Explore the available options on the Multipass website.
- Cloud-Init Integration: Multipass supports cloud-init, allowing you to customize your VM configuration during creation.
Multipass is a valuable tool for developers seeking a streamlined and efficient way to work with local VMs. Its simplicity, cross-platform compatibility, and pre-configured environments make it an ideal choice for various development scenarios.
I hope this post helps you. If you know a person who can benefit from this information, send them a link of this post. If you want to get notified about new posts, follow me on YouTube , Twitter (x) , LinkedIn , and GitHub .
![waffarx cash back](/img/waffarx-banner.png)