How To Install vagrant on Ubuntu 20.04
Introduction
In this tutorial we learn how to install vagrant
on Ubuntu 20.04.
What is vagrant
vagrant is:
This package provides the tools to create and configure lightweight, reproducible, and portable virtual environments.
Vagrant uses Oracle’s VirtualBox to create its virtual machines and then uses Chef or Puppet to provision them. Ruby-Versions: all
Package: vagrant Architecture: all Version: 2.2.6+dfsg-2ubuntu1 Priority: optional Section: universe/admin Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Ruby Team [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 3105 Depends: libarchive-tools, curl, openssh-client, rsync, ruby, ruby-bcrypt-pbkdf (>= 1.0.0), ruby-childprocess (>= 0.6.0), ruby-ed25519 (>= 1.2.4), ruby-erubis (>= 2.7.0), ruby-i18n (>= 1.1.1), ruby-listen (>= 3.1.5), ruby-log4r (>= 1.1.9), ruby-net-scp (>= 1.2.0), ruby-net-sftp (>= 2.1), ruby-net-ssh (>= 5.1.0), ruby-rest-client (>= 1.6.0), ruby-vagrant-cloud (>= 2.0.3), ruby-zip (>= 1.2.2) Recommends: vagrant-libvirt Suggests: virtualbox (>= 4.0) Breaks: virtualbox (>= 6.2) Filename: pool/universe/v/vagrant/vagrant_2.2.6+dfsg-2ubuntu1_all.deb Size: 425092 MD5sum: d12595e3753a1f183b9177f3b38f8bad SHA1: 20071fd7918f0785352415901fee546e3934463e SHA256: 575dcda868944fde37dc50a589d6d679ec02b4d2cf7548ec9d86065c8a13895a Homepage: https://www.vagrantup.com Description-en: Tool for building and distributing virtualized development environments This package provides the tools to create and configure lightweight, reproducible, and portable virtual environments.
Vagrant uses Oracle’s VirtualBox to create its virtual machines and then uses Chef or Puppet to provision them. Ruby-Versions: all
There are three methods to install vagrant
on Ubuntu 20.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install vagrant Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install vagrant
using apt-get
by running the following command:
sudo apt-get -y install vagrant
Install vagrant Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install vagrant
using apt
by running the following command:
sudo apt -y install vagrant
Install vagrant Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install vagrant
using aptitude
by running the following command:
sudo aptitude -y install vagrant
How To Uninstall vagrant on Ubuntu 20.04
To uninstall only the vagrant
package we can use the following command:
sudo apt-get remove vagrant
Uninstall vagrant And Its Dependencies
To uninstall vagrant
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove vagrant
Remove vagrant Configurations and Data
To remove vagrant
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge vagrant
Remove vagrant configuration, data, and all of its dependencies
We can use the following command to remove vagrant
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge vagrant
References
Summary
In this tutorial we learn how to install vagrant
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.