前言:從Vagrant常用命令開始...
??Vagrant 版本 2.2.0
1.Box常用命令
2.VM常用命令
1.Box常用命令
命令 | 說明 |
---|---|
vagrant box list | 列出所有的box |
vagrant box add [options] <name, url, or path> | 添加一個box |
vagrant init | 初始化一個新VM |
# 添加一個ubuntu Box的三種方式
# 1.從vagrantup平臺添加
? vagrant box add ubuntu/trusty64
# 2.與1相同几睛,從vagrantup平臺添加
? vagrant box add https://app.vagrantup.com/ubuntu/boxes/trusty64
# 3.下載box房轿,本地添加
? vagrant box add ubuntu ./ubuntu.box
2.VM常用命令
命令 | 說明 |
---|---|
vagrant up | 啟動VM |
vagrant status | 查看VM狀態(tài) |
vagrant ssh | 登錄VM |
vagrant halt | 關(guān)閉VM |
vagrant suspend | 掛起VM |
vagrant destory | 銷毀VM |
總結(jié)
熟悉vagrant常用命令后,開始打造統(tǒng)一開發(fā)平臺