vagrant安装使用

先决条件

      注:第一个是虚拟机软件,第二个是操作工具(有界面方便操作)

验证安装

安装 Vagrant 后,通过打开新的命令提示符或控制台并检查vagrant可用来验证安装是否有效。

提示:如果您收到未找到 Vagrant 的错误,请尝试注销并重新登录您的系统(有时对于 Windows 尤其必要)。

$ vagrantUsage: vagrant [options] <command> [<args>]
    -v, --version                    Print the version and exit.    -h, --help                       Print this help.
# ...

启动并运行

运行以下两个命令后,您将在VirtualBox 中拥有一个完全运行的虚拟机,运行 Ubuntu 18.04 LTS 64-bit

初始化

  $ vagrant init hashicorp/bionic64

启动虚拟机。

$ vagrant up
 



原文地址:https://www.cnblogs.com/blange/p/15246172.html