Search Suggest

How to install vagrant on Ubuntu 16.04

In this tutorial you will learn how to install Vagrant in Ubuntu System and how to Download vagrant box from internet ad use as a VM.

Install Virtualbox
$ sudo apt-get install virtualbox

Install Vagrant Package
$ sudo apt-get install vagrant

Check Vagrant version
$ vagrant -v
Vagrant 1.8.1

Install Vagrant virtual box
You can check latest Vagrant box version on Vagrant website

Download Vagrant box
$ vagrant box add ubuntu/xenial64

==> box: Loading metadata for box 'ubuntu/xenial64'
    box: URL: https://vagrantcloud.com/ubuntu/xenial64
==> box: Adding box 'ubuntu/xenial64' (v20190406.0.0) for provider: virtualbox
    box: Downloading: https://vagrantcloud.com/ubuntu/boxes/xenial64/versions/20190406.0.0/providers/virtualbox.box
    box: Progress: 15% (Rate: 1174k/s, Estimated time remaining: 0:06:25)

==> box: Successfully added box 'ubuntu/xenial64' (v20190406.0.0) for 'virtualbox'!


Run command to list installed Vagrant box name
$ vagrant box list
ubuntu/xenial64 (virtualbox, 20190406.0.0)

Run command to initialise vagrant box
$ vagrant init ubuntu/xenial64

Now start Vagrant box
$ vagrant up

Connect Vagrant machine using SSH
$ vagrant ssh

Logout from Vagrant Machine
$ logout

Delete Vagrant box
$ vagrant box remove Vagrant_Box_Name

إرسال تعليق