Installing vagrant on ubuntu, Debian
If you’re a developer looking to streamline your workflow or manage development environments seamlessly, Vagrant is an essential tool to consider. Vagrant uses a simple command-line interface to manage virtual environments and make it easier to configure and deploy systems. In this blog, we’ll walk through the steps to install Vagrant on your Debian or Ubuntu machine.
Before you begin the installation, ensure you have the following:
Vagrant relies on a provider to create and manage virtual machines. The most common provider is VirtualBox, an open-source virtualization solution. To install VirtualBox on your Debian or Ubuntu system, follow these steps:
sudo apt update
sudo apt install virtualbox
After installation, confirm that VirtualBox is installed correctly:
virtualbox --help
Now that VirtualBox is set up, you can proceed to install Vagrant.
Visit the official Vagrant downloads page and copy the link for the Linux version. Alternatively, you can use the command line to download it directly.
wget https://releases.hashicorp.com/vagrant/VAGRANT_VERSION/vagrant_VAGRANT_VERSION_amd64.deb
Make sure to replace VAGRANT_VERSION with the latest version number available on the website.
Use dpkg to install the downloaded .deb file:
sudo dpkg -i vagrant_VAGRANT_VERSION_amd64.deb
If you encounter any issues with dependencies, run:
sudo apt install -f
vagrant --version
With Vagrant installed, you can now set up a new environment.
mkdir my-vagrant-project
cd my-vagrant-project
vagrant init ubuntu/bionic64
This command creates a Vagrantfile in your project directory, using the Ubuntu 18.04 (Bionic Beaver) box as your base.
vagrant up
Vagrant will automatically download the specified base box if it’s not already available, and then it will start up the virtual machine.
vagrant ssh
You’re now inside your virtual environment, ready for development!
Installing Vagrant on Debian or Ubuntu is a straightforward process. With Vagrant and VirtualBox, you can create and manage consistent development environments effortlessly.
Related Articles
Installing vagrant on ubuntu, Debian
A Step-by-Step Guide to Installing Vagrant on Debian/Ubuntu for managing development environments seamlessly.
How We Set Up Our KVM Hypervisor: From Bare Metal to Production-Ready VM Host
Detailed walkthrough of building a dedicated KVM/libvirt hypervisor with XFS tuning, hugepages, 10GbE tuning, and automation.
Building a Predictable KVM Infrastructure: From Chaos to Control
How to engineer a predictable KVM-based infrastructure focusing on repeatability, observability, and operational safety.