在 Windows 上安装 VirtualBox
VirtualBox
![](/data/attachment/album/202309/27/150351mos0snvjpqnz4qv1.jpg)



> 
> 简单易学的指南，帮助你在 Windows 上安装 Oracle VirtualBox，以便在虚拟机中安装 Linux。
> 
> 
> 


VirtualBox 是 [最好的虚拟化软件](/article-15911-1.html) 之一。


如果你想 [使用 Windows 上的 VirtualBox，在虚拟机中安装 Linux](/article-15183-1.html)，第一步是安装 VirtualBox 应用本身。


我们已经介绍了 [在 Ubuntu 上安装 VirtualBox](/article-11282-1.html) 的教程。让我重点介绍 Windows 系统的步骤。


对于最新的 Windows 10 或 11 及更早版本，步骤将相同。在 Windows 上安装 Oracle VirtualBox 的两种简单方法：


1. 下载 Windows 版安装程序并按照屏幕上的说明进行操作
2. 使用 winget 工具


### 1、使用 Windows 安装程序


要开始使用，请前往 [VirtualBox 的官方下载页面](https://www.virtualbox.org/wiki/Downloads)。单击 “**Windows host**” 选项下载 .exe 安装程序。


![](/data/attachment/album/202309/27/150353zzpm38pm5rmtlx0e.jpg)


下载安装程序（.exe）文件后，启动它后将执行以下操作：


![](/data/attachment/album/202309/27/150353myrceynre2epnz2y.jpg)


安装指导允许你选择安装位置。你应该坚持使用 C: 驱动器上的默认设置，以确保安装 VirtualBox 所需的所有内容，使其按预期工作。


![](/data/attachment/album/202309/27/150353puwidrd7abxuxp7a.jpg)


安装过程包括设置虚拟网络接口。因此，你的网络此时可能会被重置。确保安装时没有连接到任何重要的东西。


![](/data/attachment/album/202309/27/150353plder3uiob8ejf3v.jpg)


在对网络功能进行重整的同时，还需要处理一些依赖关系。


需要安装 Python 核心包才能使 Python 绑定正常工作。如果你不想使用 Python 脚本控制虚拟机，则不一定需要安装它。


![](/data/attachment/album/202309/27/150353ss04jbmq6t7sk099.jpg)


但是，如果你认为将来可能需要它们，则应该将其与它一起安装。


现在，最终的安装过程将根据你上面的偏好开始，并且它将向你提供在关闭安装程序时启动 VirtualBox 的选项。


![](/data/attachment/album/202309/27/150353qujyfky2xpqwq5qn.jpg)


### 2、使用 winget 工具


`winget` 命令行工具使用 Windows 包管理器在 Windows 10 和 11 上搜索、安装、升级、删除和配置应用。


如果你更喜欢使用命令行，那么这就是适合你的方法。


首先，你需要以**管理员**身份启动**命令提示符**。


![](/data/attachment/album/202309/27/150354ltrek7rrzxuxef7u.jpg)


接下来，你需要使用 `winget` 命令来安装 VirtualBox。


这是要输入的命令：



```
winget install Oracle.VirtualBox

```


> 
> ? 如果你是第一次使用 winget，它会要求你同意这些条款。你需要接受它们才能继续使用它，同时你的一些数据（例如区域）将发送到微软商店。
> 
> 
> 


![](/data/attachment/album/202309/27/150354izrqh18v80nr06hq.jpg)


### 下一步是启用虚拟化


你可以注意到，这两种方法都会安装适用于 Windows 的最新 VirtualBox 软件包。因此，你可以开始使用 VirtualBox 来创建和管理虚拟机。


但安装 VirtualBox 只是第一步。你应该通过调整一些设置来 [确保你的 Windows 系统已做好虚拟化准备](/article-16186-1.html)。以下是更多详细信息。



> 
> **[让你的 Windows 系统为虚拟机做好准备](/article-16186-1.html)**
> 
> 
> 


? 你在流程中遇到过任何问题吗？你更喜欢哪种方法？请在下面的评论中告诉我。


*（题图：MJ/ac593dfb-8d50-4e77-a3d7-6b772bcfc870）*




---


via: <https://itsfoss.com/install-virtualbox-windows/>


作者：[Ankush Das](https://itsfoss.com/author/ankush/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[校对者ID](https://github.com/%E6%A0%A1%E5%AF%B9%E8%80%85ID)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

VirtualBox is one of the [best virtualization software](https://itsfoss.com/virtualization-software-linux/) out there.

If you want to [install Linux on Windows in a virtual machine using VirtualBox](https://itsfoss.com/install-linux-in-virtualbox/), the first step is to install the VirtualBox application itself.

We have covered a tutorial to [install VirtualBox on Ubuntu](https://itsfoss.com/install-virtualbox-ubuntu/). Let me highlight the steps for a Windows system.

The steps will be the same for the latest Windows 10 or 11 and older. Two easy ways to get Oracle VirtualBox installed on Windows:

**Download the installer for Windows and follow the on-screen instructions****Use the winget tool**

## 1. Using the Windows Installer

To get started, head to [VirtualBox's official download page](https://www.virtualbox.org/wiki/Downloads). Click on "**Windows hosts**" option to download the .exe installer.

![virtualbox download](https://itsfoss.com/content/images/2023/07/virtualbox-exe-download.jpg)

Once you download the installer (.exe) file, here's what is next after launching it:

![virtualbox installation start](https://itsfoss.com/content/images/2023/07/vbox-installer-next.jpg)

The installation instructions let you choose a location to get it installed to. You should stick with the defaults on the C: drive to ensure everything essential gets installed for VirtualBox to work as expected.

![virtualbox installation storage location](https://itsfoss.com/content/images/2023/07/vmbox-location.jpg)

The installation process includes setting up virtual network interfaces. So, your network might get reset at the moment. Ensure that you are not connected to anything important at the time of installing it.

![virtualbox installation networking interfaces](https://itsfoss.com/content/images/2023/07/vmbox-network-interface.jpg)

While the networking feature gets sorted, there are also dependencies to take care of.

The Python core package needs to be installed for Python bindings to work. You do not necessarily need to install it if you would rather not control your virtual machine using Python scripts.

![virtualbox installation dependencies](https://itsfoss.com/content/images/2023/07/vmbox-dependencies.jpg)

However, if you think you might need them in the future, you should install it along with it.

Now, the final installation process will begin as per your preferences above, and it will present you with the option to launch VirtualBox upon closing the installer.

![virtualbox installation complete](https://itsfoss.com/content/images/2023/07/vmbox-install-complete.jpg)

**Suggested Read 📖**

[10 Reasons to Run Linux in Virtual MachinesYou can run any operating system as a virtual machine to test things out or for a particular use case. When it comes to Linux, it is usually a better performer as a virtual machine when compared to other operating systems. Even if you hesitate to install Linux on bare](https://itsfoss.com/why-linux-virtual-machine/)![](https://itsfoss.com/content/images/wordpress/2022/04/reasons-to-install-linux-in-virtualmachines.jpg)


![](https://itsfoss.com/content/images/wordpress/2022/04/reasons-to-install-linux-in-virtualmachines.jpg)

## 2. Using the winget tool

The winget command-line tool uses the Windows Package Manager to search, install, upgrade, remove, and configure applications on Windows 10 and 11.

If you prefer to use the command-line, this is the method for you.

First, you need to launch **Command Prompt** as an **administrator**.

![command prompt](https://itsfoss.com/content/images/2023/07/cmd-administrator.jpg)

Next, you need to use the winget command to install VirtualBox.

Here's the command to type in:

`winget install Oracle.VirtualBox`


![winget installing virtualbox](https://itsfoss.com/content/images/2023/07/winget-vbox-1.jpg)

## Enabling virtualization is the next step

As you can notice, both the methods install the latest VirtualBox package for Windows. So, you can get started using VirtualBox to create and manage virtual machines.

But installing VirtualBox is only the first step. You should [ensure that your Windows system is virtualization ready](https://itsfoss.com/windows-enable-virtualization/) by tweaking some settings. Here are more details.

[How to Enable Virtualization on WindowsHere are the things you need to make sure that your Windows system is ready to run virtual machines.](https://itsfoss.com/windows-enable-virtualization/)![](https://itsfoss.com/content/images/2023/07/preparing-windows-system-for-vms.png)


![](https://itsfoss.com/content/images/2023/07/preparing-windows-system-for-vms.png)

💬 *Did you face any issues with the process? What method do you prefer? Let me know in the comments below.*