Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

Vagrant で良く使うコマンド

More than 3 years have passed since last update.

Vagrant で良く使うコマンドについて記載

バージョン確認

$ vagrant -v

ヘルプ

$ vagrant -h

boxの一覧を表示

$ vagrant box list

boxを追加

 $ vagrant box add NAME URL

boxを削除

 $ vagrant box remove boxName

Vagrantfileの作成

$ vagrant init boxName

VagrantfileをGUIモードに設定
(Vagrantfile内の以下の記述をコメントアウト)

    config.vm.provider :virtualbox do |vb|
        vb.gui = true
    end

仮想マシンの起動

$ vagrant up

仮想マシンの一時停止

$ vagrant suspend

仮想マシンの状態確認

vagrant status

仮想マシンの再起動

$ vagrant resume

仮想マシンの削除

vagrant destory

sshでログイン

$ vagrant ssh

以上

suisuina
Technical director,engineer
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away