Skip to content

Instantly share code, notes, and snippets.

@mayeaux
Forked from tomysmile/setup-vagrant-macosx.md
Created May 20, 2018 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mayeaux/964eb3f8f298fc4dc08563a8d2480bf8 to your computer and use it in GitHub Desktop.
Save mayeaux/964eb3f8f298fc4dc08563a8d2480bf8 to your computer and use it in GitHub Desktop.
How to Install Virtualbox and Vagrant on MacOSX

Install Virtualbox && Vagrant for MacOSX

Vagrant uses Virtualbox to manage the virtual dependencies. You can directly download virtualbox and install or use homebrew for it.

$ brew cask install virtualbox

Now install Vagrant either from the website or use homebrew for installing it.

$ brew cask install vagrant

Vagrant-Manager helps you manage all your virtual machines in one place directly from the menubar.

$ brew cask install vagrant-manager

Usage Add the Vagrant box you want to use. We'll use Ubuntu 12.04 for the following example.

$ vagrant box add precise64 http://files.vagrantup.com/precise64.box

You can find more boxes at Vagrant Cloud

Now create a test directory and cd into the test directory. Then we'll initialize the vagrant machine.

$ vagrant init precise64

Now lets start the machine using the following command.

$ vagrant up

You can ssh into the machine now.

$ vagrant ssh

Halt the vagrant machine now.

$ vagrant halt

Other useful commands are suspend, destroy etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment