snippetbashTip
vagrant — Manage lightweight, reproducible, and portable development environments. Some subcommands such as `b
Viewed 0 times
commandvagrantandlightweightmanageclireproducibleportable
Problem
How to use the
vagrant command: Manage lightweight, reproducible, and portable development environments. Some subcommands such as box, snapshot, halt, etc. have their own usage documentation. More information: <https://developer.hashicorp.com/vagrant/docs/cli>.Solution
vagrant — Manage lightweight, reproducible, and portable development environments. Some subcommands such as box, snapshot, halt, etc. have their own usage documentation. More information: <https://developer.hashicorp.com/vagrant/docs/cli>.Create a
Vagrantfile in the current directory with the base Vagrant box:vagrant initCreate a
Vagrantfile with a box from the Vagrant Public Registry:vagrant init {{ubuntu/focal64}}Start and provision the Vagrant environment:
vagrant upSuspend the machine:
vagrant suspendHalt the machine:
vagrant haltConnect to the machine via SSH:
vagrant sshOutput the SSH configuration file of the running Vagrant machine:
vagrant ssh-configList all local boxes:
vagrant box listCode Snippets
Create a `Vagrantfile` in the current directory with the base Vagrant box
vagrant initCreate a `Vagrantfile` with a box from the Vagrant Public Registry
vagrant init {{ubuntu/focal64}}Start and provision the Vagrant environment
vagrant upSuspend the machine
vagrant suspendHalt the machine
vagrant haltContext
tldr-pages: common/vagrant
Revisions (0)
No revisions yet.