First, look for the Git Bash prompt provided by msysGit. It's probably on your desktop, but if you can't find it there, have a look in the Start Menu.

This is a version of Bash, which is a standard shell on GNU/Linux systems (for shell basics, start here). Fire it up and enter the following commands:

mkdir vagrant_demo
cd vagrant_demo
vagrant init hashicorp/precise32

You should now have a folder containing a basic Vagrantfile. (There's a lot of documentation on Vagrantfiles.)

Next, do vagrant up, which should download an image, set it up, and start a virtual machine running in VirtualBox. This will probably take a while.

There you have it: A working Linux VM. What now? Well, you can:

Once you're done with a machine, you can remove it with vagrant destroy.

If you're interested in trying other operating systems and configurations, read the manual on boxes, then have a look at the list of available boxes from HashiCorp - you're not limited to these, but it's a good place to start.

This guide was first published on Feb 25, 2015. It was last updated on Feb 25, 2015.

This page (Run Bash and Fire up a New Vagrant Box) was last updated on Apr 15, 2021.

Text editor powered by tinymce.