Try   HackMD

Virtual Box 虛擬機使用教學

上資訊安全課程的時候常常會使用到 Virtual Box ,但是要怎麼在自己的電腦使用 Virtual Box 呢?
今天就來看看吧!

Virtual Box 安裝

  1. 前往 Virtual Box 官網 https://www.virtualbox.org/

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  2. 點擊 Download

  3. 根據電腦系統選擇相對應版本
    後面以 Windows 為例,基本上都是相同的

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  4. 安裝
    跟著點下一步即可

下載 iso 檔案

我們的虛擬機下載完之後,接下來需要有一個系統讓他在 Virtual Box 上執行
這裡我們以 Ubuntu 20.04 為例

  1. 前往 Ubuntu 下載頁面 https://ubuntu.com/download/desktop
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
  2. 點擊 Download

虛擬機建立

  1. 至 Virtual Box 新增虛擬機

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  2. 設定虛擬機名稱、位置
    另外,類型與版本請選擇 Linux 以及 Ubuntu (64-bit)

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  3. 配置虛擬機記憶體大小,這裡設定 4GB (建議不要低於 2GB)

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  4. 選擇 立即建立虛擬硬碟

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  5. 選擇 VDI(VirtualBox 磁碟映像)

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  6. 選擇 動態分配

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  7. 最後配置虛擬機硬碟大小,這裡選擇 20GB

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

虛擬機設定

現在,我們已經將虛擬機的基本配置完成了,最後要將剛剛下載的 iso 檔案放到虛擬機內,如此一來就可以執行我們的虛擬機囉!

  1. 進入設定 > 存放裝置
    要先點擊剛剛新增的虛擬機,再點擊右側上方的 設定 喔!
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
  2. 新增 iso 檔
    選擇CD圖案的按鈕,接下來選擇加入,找到剛剛下載的檔案
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

接下來就可以開啟我們的 Ubuntu 囉!

第一次開機

第一次開機需要先進行設定

  1. 選擇啟動磁碟
    選擇剛剛下載的 iso ,初始值設定應該就是這個了

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  2. 下載
    語言建議選擇 English
    接下來點擊 Install Ubuntu

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  3. 鍵盤語言配置
    鍵盤也建議選擇 English(US)

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  4. 更新
    這裡只要跟著原本的設定就可以了
    選擇 Normal Installation 以及 Download updates while installing Ubuntu

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  5. 下載方式
    請安心的選擇 Erase disk and install Ubuntu ,並點擊 continue

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  6. 選擇地區
    接下來選擇你所在的區域,按照預設值即可

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  7. 使用者設定
    接下來設定一下使用者的相關設定

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

最後只需要等待,並重新啟動即可

掛載 Guest Additions CD 映像

現在已經可以開啟 Ubuntu 20.04 了,但是你會發現到它沒辦法放大
我們要另外掛載 Guest Additions CD 映像

開啟虛擬機後,在上方 裝置 選擇 插入 Guest Additions CD 映像 ,並選擇 run

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

出現這個畫面就表示安裝成功囉

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

重新啟動虛擬機就可以正常放大囉!

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

雙向剪貼簿

很多時候,我們會需要將本機的剪貼簿和虛擬機共用
為了方便,這裡也設定一下虛擬機的雙向剪貼簿吧!

在虛擬機上方選擇 裝置 > 共用剪貼簿 > 雙向
這樣就可以囉! 如果效果沒有立即呈現,也可以重新啟動虛擬機看看喔!

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

tags: 資訊安全補充講義