vagrant
Manage portable virtual development environments
TLDR
Initialize new Vagrantfile
SYNOPSIS
vagrant [up] [ssh] [halt] [destroy] [status] [options]
DESCRIPTION
vagrant manages virtual development environments. It automates VM creation, configuration, and provisioning.
Vagrantfile defines the VM configuration. It specifies the base box, network settings, shared folders, and provisioning scripts.
Boxes are base images. Many are available from Vagrant Cloud. Custom boxes can be created and shared.
Providers handle virtualization. VirtualBox is default, with support for VMware, Hyper-V, Docker, and cloud providers.
Provisioners configure VMs after boot. Shell scripts, Ansible, Puppet, and Chef are supported.
Multi-machine setups define several VMs in one Vagrantfile. They can model complex environments like clusters.
PARAMETERS
init [BOX]
Initialize Vagrantfile.up
Start and provision VM.ssh [NAME]
SSH into VM.halt
Stop VM.destroy
Remove VM.reload
Restart VM with config.provision
Run provisioners.status
Show VM status.global-status
All Vagrant VMs.box add BOX
Add box.box list
List boxes.box remove BOX
Remove box.--provider NAME
Provider (virtualbox, vmware, etc.).-f, --force
Force operation.
CAVEATS
Requires virtualization software. Large boxes need download time and disk space. Provider-specific features may vary.
HISTORY
Vagrant was created by Mitchell Hashimoto in 2010 and later developed by HashiCorp. It revolutionized development environment management, enabling reproducible setups.
SEE ALSO
virtualbox(1), docker(1), ansible(1), packer(1)
