第五节 启动 Homestead 虚拟机

最后更新于:2022-04-02 01:41:47

[TOC] ## 启动 Homestead ~~~bash > cd E:/Homestead && vagrant up ~~~ 成功后显示 ~~~bash · · ==> homestead-7: flag to force provisioning. Provisioners marked to run always will still run. ~~~ ## SSH 登录 Homestead 虚拟机 ~~~bash > vagrant ssh ~~~ 成功后显示 ~~~bash Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-81-generic x86_64) · · vagrant@homestead:~$ ~~~ ## 退出虚拟机 ~~~bash $ exit ~~~ 成功后显示 ~~~bash logout Connection to 127.0.0.1 closed. ~~~ ## 关闭 Homestead ~~~bash > vagrant halt ~~~ 成功后显示 ~~~bash ==> homestead-7: Attempting graceful shutdown of VM... ~~~ ## Vagrant 常用命令行 | 命令行 | 说明 | | ----------------- | --------------------------------------- | | `vagrant init` | 初始化 vagrant | | `vagrant up` | 启动 vagrant | | `vagrant halt` | 关闭 vagrant | | `vagrant ssh` | 通过 SSH 登录 vagrant(需要先启动 vagrant)| | `vagrant provision` | 重新应用更改 vagrant 配置 | | `vagrant destroy` | 删除 vagrant |
';