1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/vagrant.md

37 lines
660 B
Markdown
Raw Normal View History

2015-12-23 15:02:45 +02:00
# vagrant
> Manage lightweight, reproducible, and portable development environments.
> More information: <https://www.vagrantup.com>.
2015-12-23 15:02:45 +02:00
- Create Vagrantfile in current directory with the base Vagrant box:
2015-12-23 15:02:45 +02:00
`vagrant init`
- Create Vagrantfile with the Ubuntu 20.04 (Focal Fossa) box from HashiCorp Atlas:
2015-12-23 15:02:45 +02:00
`vagrant init ubuntu/focal64`
2015-12-23 15:02:45 +02:00
- Start and provision the vagrant environment:
2015-12-23 15:02:45 +02:00
`vagrant up`
- Suspend the machine:
2015-12-23 15:02:45 +02:00
`vagrant suspend`
2019-04-30 15:52:55 +08:00
- Halt the machine:
`vagrant halt`
- Connect to machine via SSH:
2015-12-23 15:02:45 +02:00
`vagrant ssh`
2020-09-25 14:35:24 +08:00
- Output the SSH configuration file of the running Vagrant machine:
`vagrant ssh-config`
2022-02-23 22:33:19 +08:00
- List all local boxes:
`vagrant box list`