How to install Vagrant on Linux BOX, this one is for Debian and Ubuntu systems

A quick and easy tutorial on how to install Vagrant on your machine via command line.
Let's start with opening the terminal window and typing in some code:

Let's start, we will need gnupg and curl in our system

sudo apt install curl gnupd

If you are missing or getting an error that the apt-add-repository is missing etc. run this code to install it:

sudo apt install software-properties-common

Let get into the steps of installing Vagrant on our machine, finally:

curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get update && sudo apt-get install vagrant

Now you have vagrant installed on your linux machine, I will just mention that you need a VM provider to get Vagrant working, I like VirtualBox, but you can chose VmWare if you like, here are the links and code to run to get VB on your system:

Add the following line to your /etc/apt/sources.list. Debian, change the "mydist" with "bullseye", "buster", or "stretch". For Ubuntu 22.04 and older, "replace "mydist" with "jammy", "eoan", "bionic", "xenial" (all depends on your system version):

deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian <mydist> contrib

You will need the Oracle gpg key to get apt working, download the key and register in your system (please check the ling after wget and compare with the official Oracle website):

wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmor --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg

Now we can install VirtualBox on our machine (I am installing version 7.0, please check what is the newest version of VB before executing this command):

sudo apt update && sudo apt install virtualbox-7.0 -y

You have now vagrant and VirtualBox installed on your Linux box.
Enjoy!