如何在VirtualBox上安装Ubuntu

什么是VirtualBox? (What is VirtualBox?)

Oracle VM VirtualBox is a cross-platform virtualization application developed by the Oracle Corporation. It allows users to install operating systems on virtual hard disks such as Windows, macOS, Solaris and Linux.

Oracle VM VirtualBox是由Oracle Corporation开发的跨平台虚拟化应用程序。 它允许用户在虚拟硬盘上安装操作系统,例如Windows,macOS,Solaris和Linux。

As an example, you can run Windows and Linux on your Mac, run Windows server on your Linux server, or run Linux on your Windows PC while running your other existing applications.

例如,您可以在Mac上运行Windows和Linux,在Linux服务器上运行Windows服务器,或在Windows PC上运行Linux,同时运行其他现有应用程序。

Disk space and memory are the only problems that you'll face when installing multiple virtual machines.

磁盘空间和内存是安装多个虚拟机时唯一要面对的问题。

为什么需要它 (Why You’ll Need It)

  • Oracle’s VirtualBox is easy to install and use

    Oracle的VirtualBox易于安装和使用
  • It's free

    免费
  • You can run and experience any operating system safely

    您可以安全地运行和体验任何操作系统
  • If you’re a developer, VirtualBox can be used as a tool for safely testing your own development projects in multiple OS environments

    如果您是开发人员,则可以将VirtualBox用作在多个OS环境中安全测试自己的开发项目的工具
  • It can run everywhere from small embedded systems to laptops

    它可以从小型嵌入式系统到笔记本电脑的任何地方运行
  • It's good for testing and disaster recovery as it can be easily copied, backed-up, and transported between hosts

    它可以轻松地在主机之间复制,备份和传输,因此对于测试和灾难恢复非常有用。

VirtualBox安装 (VirtualBox Installation)

VirtualBox can be downloaded here: VirtualBox Downloads

可以在这里下载VirtualBoxVirtualBox下载

为什么选择Ubuntu? (Why Ubuntu?)

  • It's free

    免费
  • Easy customization: The GNOME desktop environment helps you customize easily

    轻松自定义:GNOME桌面环境可帮助您轻松自定义
  • It's secure

    很安全
  • Ubuntu is open-source

    Ubuntu是开源的
  • Friendly and supportive community

    友好和支持的社区
  • Low system requirements

    系统需求低
  • According to FOSSBYTES, Ubuntu is the second best Linux distro for programming and developers [2019 Edition]

    根据FOSSBYTES的说法 ,对于编程和开发人员来说 ,Ubuntu是第二好的Linux发行版[2019版]

  • It's beginner friendly

    初学者友好

安装Ubuntu (Setup for Ubuntu)

First, open VirtualBox, then click "New" to create a virtual machine.

首先,打开VirtualBox,然后单击“新建”以创建虚拟机。

Enter "Ubuntu" as the name, select "Linux" as the type, and select Ubuntu (64-bit) as the version.

输入“ Ubuntu”作为名称,选择“ Linux”作为类型,然后选择Ubuntu(64位)作为版本。

NOTE: Select any amount of memory you wish, but don't add more than 50 percent of your total RAM.

注意 :选择所需的任何内存量,但不要增加总RAM的50%以上。

Check the "Create a virtual hard disk now" option so we can later define our Ubuntu OS virtual hard disk size.

选中“立即创建虚拟硬盘”选项,以便稍后我们可以定义Ubuntu OS虚拟硬盘大小。

Now, we want to select "VHD (Virtual Hard Disk)".

现在,我们要选择“ VHD(虚拟硬盘)”。

Next, we'll dynamically allocate storage on our physical hard disk.

接下来,我们将在物理硬盘上动态分配存储。

We want to specify our Ubuntu OS's size. The recommended size is 10 GB, but you can increase the size if you wish.

我们要指定Ubuntu OS的大小。 建议的大小为10 GB,但是您可以根据需要增加大小。

After creating a virtual hard disk, you'll see Ubuntu in your dashboard.

创建虚拟硬盘后,您将在仪表板上看到Ubuntu。

Now, we have to set up the Ubuntu disk image file (.iso).

现在,我们必须设置Ubuntu磁盘映像文件(.iso)。

The Ubuntu disk image file can be downloaded here: Ubuntu OS download

可以在这里下载Ubuntu磁盘映像文件: Ubuntu OS下载

To set up the Ubuntu disk image file, go to settings and follow these steps:

要设置Ubuntu磁盘映像文件,请转到设置并按照以下步骤操作:

  1. Click "Storage"

    点击“存储”
  2. In storage devices, click "Empty"

    在存储设备中,单击“空”
  3. In attributes, click the disk image and "Choose Virtual Optical Disk File"

    在属性中,单击磁盘映像和“选择虚拟光盘文件”
  4. Select the Ubuntu disk image file and open it

    选择Ubuntu磁盘映像文件并打开它

Click OK.

单击确定。

Your Ubuntu OS is ready to install in VirtualBox. Let's start!

您的Ubuntu操作系统已准备好在VirtualBox中安装。 开始吧!

NOTE: Ubuntu VirtualBox installation and actual OS installation steps may vary. This guide helps you to install Ubuntu in VirtualBox only.

注意: Ubuntu VirtualBox安装和实际的操作系统安装步骤可能有所不同。 本指南可帮助您仅在VirtualBox中安装Ubuntu。

让我们安装Ubuntu! (Let's install Ubuntu!)

Click Install Ubuntu.

单击安装Ubuntu。

Select your keyboard layout.

选择键盘布局。

In the "Updates and other software" section, check "Normal installation" and continue.

在“更新和其他软件”部分中,检查“常规安装”并继续。

In "Installation type", check "Erase disk and install Ubuntu".

在“安装类型”中,选中“擦除磁盘并安装Ubuntu”。

Click "Continue".

点击“继续”。

Choose your current location.

选择您当前的位置。

Now, set up your profile.

现在,设置您的个人资料。

You'll see Ubuntu installing.

您会看到Ubuntu安装。

After the installation, restart it.

安装完成后,重新启动它。

After logging in, you'll see the Ubuntu desktop.

登录后,您将看到Ubuntu桌面。

We have successfully installed Ubuntu in VirtualBox. It's ready to use for your future development projects.

我们已经在VirtualBox中成功安装了Ubuntu。 准备好用于您将来的开发项目。

让我们验证安装。 (Let's verify the installation.)

Open your terminal (Press Ctrl+Alt+T) and type in the commands below and check if they work.

打开终端(按Ctrl + Alt + T),然后输入以下命令,然后检查它们是否有效。

  1. pwd: This will print the current working directory

    pwd:这将打印当前工作目录
  2. ls: This will list all items in your current directory

    ls:这将列出当前目录中的所有项目

After checking those, power off your machine by using the following command.

检查这些内容后,使用以下命令关闭计算机电源。

poweroff

结论 (Conclusion)

VirtualBox is free and is a great tool for running multiple operating systems on a single OS. Ubuntu has many benefits. If you're a beginner to Linux, I would recommend you use Ubuntu as it's beginner friendly.

VirtualBox是免费的,并且是在单个OS上运行多个操作系统的绝佳工具。 Ubuntu有很多好处。 如果您是Linux的初学者,我建议您使用Ubuntu,因为它对初学者很友好。

Please feel free to let me know if you have any questions.

如有任何疑问,请随时告诉我。

You can contact and connect with me on Twitter and Medium.

您可以在TwitterMedium上与我联系并建立联系。

Thank you for reading.

感谢您的阅读。

Happy Coding!

编码愉快!

翻译自: https://www.freecodecamp.org/news/how-to-install-ubuntu-with-oracle-virtualbox/

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值