Vagrant Cheat Sheet

This page contain a complete list of Vagrant cheat sheet


Vagrant is an open-source tool that helps in creating and managing reproducible virtualized development environments. It allows developers to define and configure virtual machines using a simple declarative configuration file. Vagrant provides a consistent and portable development environment, making it easier to share projects among team members and across different machines.

vagrant init [box]Initializes a new Vagrant environment with a specified base box.
vagrant upStarts and provisions the Vagrant environment.
vagrant haltStops the running Vagrant environment.
vagrant destroyStops and deletes all traces of the Vagrant environment.
vagrant sshConnects to the Vagrant machine via SSH.
vagrant statusDisplays the status of the Vagrant environment.
vagrant suspendSuspends the Vagrant machine (saves its state).
vagrant resumeResumes a suspended Vagrant machine.
vagrant reloadReloads the Vagrant environment, applying any configuration changes.
vagrant provisionForces reprovisioning of the Vagrant machine.
vagrant box listLists all installed boxes on the local machine.
vagrant box add [name] [url]Adds a box with the specified name and URL to the local machine.
vagrant box remove [name]Removes a box with the specified name from the local machine.
vagrant plugin install [name]Installs a Vagrant plugin.
vagrant plugin uninstall [name]Uninstalls a Vagrant plugin.
vagrant global-statusDisplays the status of all Vagrant environments on the machine.
vagrant ssh-configOutputs OpenSSH valid configuration to connect to the Vagrant machine.
vagrant packagePackages a running Vagrant environment into a reusable box.
vagrant shareShares your Vagrant environment publicly using HashiCorp’s Atlas.
vagrant --versionDisplays the installed Vagrant version.

Note: Replace placeholders such as [box], [name], and [url] with appropriate values.

This cheat sheet covers some of the basic and commonly used Vagrant commands. For more detailed information, refer to the official Vagrant documentation.