4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Vagrant で良く使うコマンド

Posted at

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

以上

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?