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.
Command | Description |
---|---|
vagrant init [box] |
Initializes a new Vagrant environment with a specified base box. |
vagrant up |
Starts and provisions the Vagrant environment. |
vagrant halt |
Stops the running Vagrant environment. |
vagrant destroy |
Stops and deletes all traces of the Vagrant environment. |
vagrant ssh |
Connects to the Vagrant machine via SSH. |
vagrant status |
Displays the status of the Vagrant environment. |
vagrant suspend |
Suspends the Vagrant machine (saves its state). |
vagrant resume |
Resumes a suspended Vagrant machine. |
vagrant reload |
Reloads the Vagrant environment, applying any configuration changes. |
vagrant provision |
Forces reprovisioning of the Vagrant machine. |
vagrant box list |
Lists 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-status |
Displays the status of all Vagrant environments on the machine. |
vagrant ssh-config |
Outputs OpenSSH valid configuration to connect to the Vagrant machine. |
vagrant package |
Packages a running Vagrant environment into a reusable box. |
vagrant share |
Shares your Vagrant environment publicly using HashiCorp’s Atlas. |
vagrant --version |
Displays 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.