Linux Mint

Manage Virtual Machines – Install Vagrant on Linux Mint 21

If you are looking to install more than one operating system on Linux Mint, then there is only one way and that is by creating a virtual machine. Vagrant is used to manage the virtual machine but still hypervisors like VirtualBox are required. In short Vagrant is a tool that is used to manage multiple virtual machines on Linux so read this guide to install Vagrant on Linux Mint 21.

Install Vagrant on Linux Mint 21

To install Vagrant on Linux mint one must have VirtualBox on it so follow the steps below to install Vagrant on Linux Mint 21:

Step 1: It is recommended that before installation update the package list of default package manager using:

$ sudo apt update

Step 2: Next, install the VirtualBox on Linux Mint using apt package manager:

$ sudo apt install virtualbox -y

Step 3: Download the deb file of Vagrant using:

$ wget https://releases.hashicorp.com/vagrant/2.2.19/vagrant_2.2.19_x86_64.deb

Text Description automatically generated

Step 4: If you have downloaded the file in some other directory, then you need to change the directory using cd command.

Since the file is downloaded in the home directory so I don’t need to change the directory to install the file use:

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

Step 5: Next, to be sure if it is installed successfully check the version of Vagrant:

$ vagrant --version

Graphical user interface, text, application Description automatically generated

Step 6: Now, create a directory for Vagrant using mkdir command:

$ mkdir ~/vagrant

Now move to that directory using change directory command:

$ cd vagrant

Graphical user interface, text, application Description automatically generated

Step 7: Next, go to the official website and select the suitable vagrant box for instance I have chosen the jessie64 so once you have selected the vagrant box use the following syntax:

$ vagrant init <vagrant-box>

As mentioned above I have selected the debian/jessie64 so using the above syntax:

$ vagrant init debian/jessie64

Step 8: Now add the Vagrant box to the VirtualBox using:

$ vagrant up

Step 9: Now run the VirtualBox to see if Vagrant is setup in it, to open VirtualBox you will find it under the administration option in the Linux Mint start menu:

Now you can install any virtual machine on Linux Mint through Vagrant, if you need assistance reading installing any virtual machine on VirtualBox then read this guide.

If you do not need Vagrant anymore then uninstall it using the apt package manager:

$ sudo apt remove --autoremove vagrant -y

Conclusion

Vagrant is a utility that is mainly used in Linux systems for the purpose of managing multiple virtual machines. Moreover, to install it on Linux Mint 21 one needs to have a VirtualBox installed on their system, the detailed description of installing the Vagrant on Linux Mint 21 is mentioned in this guide.

About the author

Aaliyan Javaid

I am an electrical engineer and a technical blogger. My keen interest in embedded systems has led me to write and share my knowledge about them.