In this Vagrant tutorial, we will review how to install Vagrant quickly for Windows 10 with Virtualbox.
First, please make sure to Download and Install the following applications:
- Git (the latest stable): https://git-scm.com/downloads
- Vagrant (the latest stable): https://www.vagrantup.com/downloads.html
- VirtualBox (the latest stable): https://www.virtualbox.org/wiki/Downloads
When the above applications are installed, it’s time to do the magic.
How to Install Vagrant step-by-step?
Launch GIT Bash and create the folder for Vagrant installation using the command below:
mkdir "folder name"
Open the folder using the command below:
Execute the command:
vagrant init hashicorp/bionic64
The new file “Vagrantfile” should appear in the directory. Open the file using the editor, for example, using Vi editor and uncomment few lines below. Uncomment the line:
config.vm.network "forwarded_port", guest: 80, host: 8080
And modify “config.vm.synced_folder” to the following:
config.vm.synced_folder ".", "/var/www/html"
Save the file.
Finally, execute the command to build the Vagrant:
You could also download configuration or sample files that were used in the tutorial using the button(s) below and reuse it:
Other materials to consider: