How to install Vagrant on Ubuntu 20.04

Vagrant is a command line tool that helps developers create various operating system environments using virtualization technology.

It is imperative to have VirtualBox, Docker, or Hyper-V installed on your system before using Vagrant. Vagrant offers developers a comprehensive development environment that enables them to work on different operating systems.

The Vagrant tool can be installed on multiple Linux systems, but for today we’re going to be using Ubuntu and using VirtualBox as the virtualization technology.

Installation of Vagrant on Ubuntu 20.04

To download Vagrant on the Ubuntu operating system, you must first install VirtualBox on the system (if it is not already installed).

To start the download process, first use the following command to update all system packages:

$ sudo apt update

Next, start installing VirtualBox with the following command:

$ sudo apt install VirtualBox

The installation and download of VirtualBox are completed in a few minutes. After that, to install the latest version of Vagrant on Ubuntu (as it is not updated regularly), copy the following vagrant wget Package in the terminal:

After getting the package file, issue the following command to install Vagrant:

$ sudo apt install ./vagrant_2.2.9_x86_64.deb

Run the following command to verify that Vagrant installed successfully:

$ Tramp version

As you can see from the output in the terminal, Vagrant has been installed successfully. Now we can start exploring Vagrant further.

Getting started with Vagrant

To create a new project in Vagrant, first create a directory with the following command:

$ mkdir ~ / my-vagrant-project

To change the directory, enter the following command:

$ cd ~ / my-vagrant-project

Use the inside Command to initialize a new file, select a Vagrantbox start working with the file.

For example we use Centos to show you how this process works. We issue the following command in the terminal:

$ Tramp init Centos / 8

Next, we’ll use the command given below to create and configure the file:

$ Tramp

The output of the above command is as follows:

Now you can see how it works.

Here are a few more commands to demonstrate functionality:

To run ssh Enter the following command in the terminal:

$ Tramp ssh

To stop the virtual machine at any time, use the Stop Command as follows:

$ Tramp stop


The Vagrant tool is designed to help developers manage different virtual environments in a single workflow. This tutorial showed you how to install Vagrant on Ubuntu 20.04. Vagrant is a command line tool used to create virtual desktop environments using virtualization technology. You also learned how to get started with Vagrant and run various commands to understand how it works.

Related Posts