溫馨提示×

如何在Ubuntu中啟動VirtualBox

小樊
107
2025-02-25 12:39:48
欄目: 智能運維

在Ubuntu中啟動VirtualBox的步驟如下:

  1. 安裝VirtualBox
  • 打開終端,輸入以下命令以更新軟件包列表:
sudo apt update
  • 輸入以下命令以安裝VirtualBox:
sudo apt install virtualbox
  1. 啟動VirtualBox
  • 安裝完成后,可以在應用程序菜單中找到VirtualBox并打開它。
  1. 通過命令行啟動VirtualBox
  • 打開終端,輸入以下命令啟動VirtualBox:
virtualbox
  1. 設置VirtualBox開機自動啟動(可選):
  • /etc/default/ 目錄下新建 virtualbox 文件,并添加以下內容:
# VBOXAUTOSTART_DB=/etc/vbox
# VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.conf
  • 設置 vbox 目錄的權限,將當前用戶添加到 vboxusers 用戶組:
sudo chgrp vboxusers /etc/vbox
sudo chmod 1775 /etc/vbox
sudo usermod -aG vboxusers $USER
  • 新建虛擬機自動啟動配置文件 autostart.conf 并添加以下內容:
# Default policy is to deny starting a VM, the other option is "allow".
# default_policy  deny
# user vbox is allowed to start virtual machines but starting them
# will be delayed for 10 seconds

# Example: Allow user vbox to start a VM named "XP" with a startup delay of 10 seconds.

# Example: Allow user vbox to start a VM named "XP" without a startup delay.

# Example: Deny starting any VMs.

# Example: Allow user vbox to start a VM named "XP" with a startup delay of 10 seconds.
allow
startup_delay 10

# Example: Allow user vbox to start a VM named "XP" without a startup delay.
# allow
# startup_delay 0
  • 設置開啟自動啟動:
VBoxManage setproperty autostartdbpath /etc/vbox
VBoxManage modifyvm win2003 --autostart-enabled on

完成以上步驟后,您就可以在Ubuntu中啟動并使用VirtualBox了。如果遇到任何問題,可以參考VirtualBox的官方文檔或搜索相關教程。

0
亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女