commands.sh

vagrant

all

Manage lightweight, reproducible, and portable development environments. Some subcommands such as `box`, `snapshot`, `halt`, etc. have their own usage documentation.

More info →

Subcommands (15)

vagrant box

Manage Vagrant boxes (virtual machine images). See also: `vagrant`.

vagrant destroy

Stop a guest machine and destroy all its resources. Any boxes installed are kept intact. See also: `vagrant`.

vagrant halt

Shuts down the running machine Vagrant is managing. See also: `vagrant`, `vagrant box`, `vagrant plugin`, `vagrant validate`.

vagrant init

Initialize a Vagrant environment in the current directory by creating a `Vagrantfile`. See also: `vagrant`.

vagrant plugin

Manage Vagrant plugins. See also: `vagrant`.

vagrant port

List mappings between guest and host ports. See also: `vagrant`.

vagrant reload

Equivalent of running `halt` followed by `up`. A reload is usually required for changes in a Vagrantfile to take effect. See also: `vagrant`.

vagrant resume

Resume a Vagrant managed machine that was previously suspended.

vagrant snapshot

Manage snapshots of Vagrant machines. See also: `vagrant`.

vagrant ssh

SSH into a running Vagrant machine. See also: `vagrant`.

vagrant status

Display the state of machines in the current Vagrant environment. See also: `vagrant`, `vagrant global-status`.

vagrant suspend

Save the state of the guest machine rather than fully shutting it down. See also: `vagrant`.

vagrant upload

Upload files and directories from the host to the guest machine.

vagrant validate

Check the validity of a Vagrantfile. See also: `vagrant`, `vagrant box`, `vagrant plugin`.

vagrant version

Display Vagrant version information. Note: Internet access is required for vagrant version to check the latest available version.

Examples (8)

Create a `Vagrantfile` in the current directory with the base Vagrant box

Create a `Vagrantfile` with a box from the Vagrant Public Registry

vagrant init ubuntu/focal64

Start and provision the Vagrant environment

Suspend the machine

Halt the machine

Connect to the machine via SSH

Output the SSH configuration file of the running Vagrant machine

List all local boxes

made by @shridhargupta | data from tldr-pages