brew cask install vagrant
It is pretty straight forward. Then to install virtualbox, just run:
brew cask install virtualbox
Create a vagrant folder and then run the init command:
mkdir vagrant/ubuntu cd vagrant/ubuntu vagrant init ubuntu/xenial64
The ubuntu/xenial64 option is basically pointing to the vagrant “box” or the OS hosted at vagrantcloud.com. What happens is when you run vagrant up, it will download Ubuntu from the cloud and then start it automatically.