I have been using Vagrant on and off for a while and I find myself forgetting some of the commands. Instead of looking through Vagrant documentation to find the specific commands that I was looking for, I decided to capture the commands here. I hope that this reference helps somebody out.
- vagrant box add (opens in a new tab) - allows you to install a box (or VM) to the local machine
- vagrant box remove (opens in a new tab) - removes a box from the local machine
- vagrant box list (opens in a new tab) - lists the locally installed Vagrant boxes
- vagrant init (opens in a new tab) - initializes a project to use Vagrant
- vagrant up (opens in a new tab) - starts up the vagrant VM
- vagrant suspend (opens in a new tab) - saves the state of the current VM.
- vagrant resume (opens in a new tab) - will load up the suspended VM.
- vagrant halt (opens in a new tab) - will shut down the VM, saving configuration. (restart with 'up' command)
- vagrant destroy (opens in a new tab) - will destroy the VM with all config changes.
- vagrant reload (opens in a new tab) - apply Vagrant configuration changes (like port forwarding) without rebuilding the VM.
- vagrant status - tells you the current state of the Vagrant project's VM
- vagrant gem - install Vagrant plugins via RubyGems
- vagrant ssh (opens in a new tab) - short cut to SSH into the running VM
- vagrant package (opens in a new tab) - create a distribution of the VM you have running.
- vagrant <command> --help (opens in a new tab) - Command that will provide man pages for a vagrant command.
There is extensive documentation on the Vagrant website. I hope this helps!