How to install the latest version of Vagrant
- Download the Debian package (not the generic Linux zipfile)
-
Look in your Downloads directory for the exact filename. Mine was
vagrant_2.2.9_x86_64.deb
your filename may vary. -
Install. Recall that the file is in the Downloads directory, and use the correct filename. On mine it's:
sudo apt install ~/Downloads/vagrant_2.2.9_x86_64.deb
Automate the process with a simple script below:
#!/bin/bash
cd /tmp
export VERSION=$(curl -s https://api.github.com/repos/hashicorp/vagrant/tags | jq ".[0].name" | cut -c 3-8)
curl -O https://releases.hashicorp.com/vagrant/$VERSION/vagrant_{$VERSION}_x86_64.deb
chmod 755 vagrant_$(echo $VERSION)_x86_64.deb
sudo apt install ./\vagrant_$(echo $VERSION)_x86_64.deb
rm -f vagrant_$(echo $VERSION)_x86_64.deb
The code will install the latest version of Vagrant.