LoginSignup
1
2

More than 1 year has passed since last update.

Vagrantを使ってUbuntu20.04LTSの仮想マシンをインストールする

Posted at

Ubuntu20.04LTSの仮想マシンイメージを探す

VagrantのサイトでUbuntu20.04LTSの仮想マシンのイメージを探します。
Ubuntu、20.04LTSなどのキーワードを入力し、検索します。
スクリーンショット 2022-06-05 7.27.11.png

仮想マシンをインストールする

以下のコマンドを実行してください。

% vagrant box add ubuntu/focal64

Vagrantの仮想マシンを確認します。

% vagrant box list

仮想マシンの作業用ディレクトリを作成する

作業用のディレクトリを作成します。

% mkdir ubuntu2004

仮想マシンの設定ファイルを作成する

設定ファイルを作成します。
以下のコマンドを実行してください。

% cd ubuntu2004
% vagrant init ubuntu/focal64

仮想マシンを起動する

仮想マシンを起動します。
以下のコマンドを実行してください。

% vagrant up
% vagrant status

仮想マシンを停止する

仮想マシンを停止するときは、以下のコマンドを実行してください。

% vagrant halt
% vagrant status

以上で、作業は終わりです。

1
2
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
1
2