vagrant command not found

In this troubleshooting guide we learn how to fix vagrant command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

vagrant: command not found

or when using sudo you get the following error message

sudo: vagrant: command not found

Solutions to vagrant: command not found

How To Fix vagrant: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu vagrant is provided by vagrant package.

vagrant is:

This package provides the tools to create and configure lightweight, reproducible, and portable virtual environments.

Vagrant upstream uses Oracle’s VirtualBox by default to create its virtual machines. On Debian, Vagrant will use libvirt/KVM by default as VirtualBox is not part of Debian main, but will use VirtualBox if it’s installed.

To fix this problem, we can install more using the command below.

sudo apt-get -y install vagrant

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install vagrant.

sudo apt -y install vagrant

Or if you have aptitude installed you can use the following command.

sudo aptitude install vagrant

Summary

In this tutorial we learn how to fix vagrant command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.