时间:2021-05-19
Vagrant基本命令详解,具体如下:
1、检查当前的版本
2、列出所有的box
3、添加一个box
1)box名简写
Vagrant可以从这里https://atlas.hashicorp.com/boxes/search 下载各种Vagrant映像文件。
2)通过指定的URL添加远程box
3)添加一个本地box
4、初始化一个新VM
此命令会在当前目录创建一个名为Vagrantfile的配置文件,内容大致如下:
当在此目录启动Vagrant后,Vagrant会从互联网下载“ubuntu/trusty64”这个box到本地,并使用它作为VM的映像。
要搜索可用的box,查看这里: https://atlas.hashicorp.com/boxes
5、启动VM
如果我们想启动任意VM,首先进入有Vagrantfile配置文件的目录,然后执行上面的命令。控制台的输出通常如下:
6、启用SSH登陆VM
进入Vagrantfile配置文件所在的目录,执行以下命令:
要注意,本机上必须先安装SSH客户端。
7、关闭VM
进入Vagrantfile配置文件所在的目录,执行以下命令:
8、销毁VM
比如:
此命令会停止VM的运行,并销毁所有创建的资源。
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
MySQL中有很多的基本命令,show命令也是其中之一,在很多使用者中对show命令的使用还容易产生混淆,本文汇集了show命令的众多用法。1.showtabl
VI命令可以说是Unix/Linux世界里最常用的编辑文件的命令了,但是因为它的命令集众多,很多人都不习惯使用它,其实您只需要掌握基本命令,然后加以灵活运用,就
进入到系统后,按“Ctrl+Alt+T”调出命令行终端,以后的操作基本都是基本命令行模式。输入“sudoapt-getins
vi用法 VI命令可以说是Unix/linux世界里最常用的编辑文件的命令了,但是因为它的命令集众多,很多人都不习惯使用它,其实您只需要掌握基本命令,然后加以灵
问题:常用命令“ll”失效或命令未找到原因:"ll"命令不是linux的基本命令,它是"ls-l"的别名,部分版本并不直接支持“ll”命令输出。运行“vi~/.