From 6824b07cced48e37da9847d1cd54cc0cea51c2d0 Mon Sep 17 00:00:00 2001 From: niko Date: Mon, 23 Nov 2020 21:12:27 +0800 Subject: [PATCH] frogOAO --- ...s for USB, Clipboard and Folder Sharing.md | 168 +++++++++--------- 1 file changed, 87 insertions(+), 81 deletions(-) diff --git a/sources/tech/20201114 How to Install Fedora in VirtualBox -With Steps for USB, Clipboard and Folder Sharing.md b/sources/tech/20201114 How to Install Fedora in VirtualBox -With Steps for USB, Clipboard and Folder Sharing.md index 69b067c82b..4ccd0f00f6 100644 --- a/sources/tech/20201114 How to Install Fedora in VirtualBox -With Steps for USB, Clipboard and Folder Sharing.md +++ b/sources/tech/20201114 How to Install Fedora in VirtualBox -With Steps for USB, Clipboard and Folder Sharing.md @@ -7,221 +7,227 @@ [#]: via: (https://itsfoss.com/install-fedora-in-virtualbox/) [#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) -How to Install Fedora in VirtualBox [With Steps for USB, Clipboard and Folder Sharing] +如何在 Fedora 中安装 VirtualBox 【附带 USB,剪切板,文件夹共享教程】 ====== -If you are curious about Fedora Linux, there are several ways to try it. +如果您对 Fedora Linux 感兴趣,这有几种方式可以尝试它。 -The easiest way that won’t affect your current operating system is to [create a live USB of Fedora.][1] +最简单还不影响您操作系统的方式是 [制作 Fedora 的 USB 启动盘][1] -An alternative way to try Fedora, is to get advantage of virtualization technology through an installation in VirtualBox. This way, you use Fedora like an application on your current operating system. +另一种方式是安装 VirtualBox 利用虚拟化技术来尝试 Fedora。这样,你可以在你的操作系统上像使用应用程序一样使用 Fedora。 -This way, you can perform more thorough testing without messing up your current operating system. +通过这种方式,您可以执行更彻底的测试,而不会搞乱当前的操作系统。 -You can even copy your virtual setup and re-install it on some other system. Sounds handy? Let me show you how to do it. +您甚至可以复制您的虚拟安装程序,并在其他系统上重新安装它。听起来方便吗?让我来教你怎么做。 -### Installing Fedora in VirtualBox +### 在 Fedora 上安装 Fedora ![][2] -Let’s see the steps for installing Fedora Linux in Oracle VirtualBox. +让我们分步在 Oracle VirtualBox 上安装 Fedora。 -#### Step 1: Install VirtualBox +#### 步骤一:安装 VirtualBox -If you haven’t already installed VirtualBox on your system, you can download it from the official website. You can find instructions for Windows, Mac OS and Linux. [Ubuntu users can refer to this detailed tutorial on installing VirtualBox][3]. +如果您的系统还没有安装 VirtualBox,您可以从官方网站下载。您可以找到 Windows,MacOs 和 Linux 的说明。 [Ubuntu 用户可以参考这个关于安装 VirtualBox 的详细教程。][3]. ![][4] -[Download VirtualBox][5] +[下载 VirtualBox][5] -#### **Step 2: Download the Fedora ISO** +#### **步骤二: 下载 Fedora ISO** -If you are not familiar with fedora, there are a few images to be aware of. +如果您不熟悉 Fedora,那么这些镜像您需要知道。 -[Fedora IoT][6] is to be used for scalable infrastructure, [Fedora workstation][7] is an image with a set of tools oriented for a desktop in a vanilla GNOME desktop environment and [Fedora server][8] as its name reveals, is tailored for a server or data center. +[Fedora IoT][6] 是用于可扩展基础设施的, [Fedora workstation][7] 是一个镜像,带有一组面向普通GNOME桌面环境中的桌面的工具。[Fedora server][8] 顾名思义,是为服务器或数据中心定制的。 -If GNOME isn’t your first choice, you can download a [spin][9] of Fedora desktop with an alternative desktop environment. For this tutorial, I chose [Fedora 33][10] with the GNOME desktop environment. +如果GNOME不是您的首选,您可以下载一个带有替代桌面环境的[定制版][9]Fedora桌面。 对于本教程,我选择了带有GNOME桌面环境的[Fedora 33][10]。 -[Download Fedora][11] +[下载 Fedora][11] -#### Step 3: Create an empty virtual machine and configure it +#### 步骤三: 创建一个空虚拟机并对其进行配置 -Fedora requires a minimum of 20GB disk space & 2GB RAM, to install and run successfully. Although double those amounts is recommended for a smoother user experience. Based on that I will create and configure the virtual machine. +要成功安装和运行 Fedora,至少需要 20GB 磁盘空间和 2GB RAM。不过,为了获得更流畅的用户体验,建议增加一倍。在此基础上,我将创建并配置虚拟机。 -Start Virtual Box and click on New. +开启 Virtual Box 点击 New。 -![Create a new virtual machine][12] +![创建一个新的虚拟机][12] -The most important option to pay attention, is the **type to be set to Linux and the version to Fedora (64-bit)**. If you start typing Fedora at the name prompt, VirtualBox will automatically pick the correct settings for you. Although the name doesn’t have to be Fedora, it can be anything you like. +需要注意,最重要的选项是 **将类型设置为 Linux and 版本设置为 Fedora (64-bit)**。如果您在名称提示符处开始输入 Fedora,VirtualBox 将自动为您选择正确的设置。虽然名字不一定非得是 Fedora,它可以是任何你喜欢的。 -_If you have access to 32-bit version only, you need to enable virtualization technology on BIOS, if you have an AMD CPU it is called SVM. Worst-case scenario is that your CPU doesn’t support virtualization technology. If you are not sure, check this first._ +_如果您只能访问32位版本,那么您需要在 BIOS 上启用虚拟化技术,如果您有一个 AMD CPU,它被称为 SVM。最坏的情况是您的 CPU 不支持虚拟化技术。如果你不确定,先检查这个。_ -Once you have similar settings with me, click on the create button. +如果您的设置和我一样,点击 create 按钮。 ![Name your VM and assign it at least 3 GB RAM][13] -As mentioned before, you need at least 20 GB of disk space to be able to install Fedora. I have 32 GB of RAM on my system so I assigned 8 GB here. You should be fine with 3 GB of RAM. +如前所述,至少需要 20gb 的磁盘空间才能安装 Fedora。我的系统上有 32gb 的内存,所以我分配了 8gb。3 GB 的内存应该没问题。 -A word about RAM consumption, the RAM will only be consumed by the virtual machine when you are running it. Otherwise, it will be available for regular usage. +顺便说下内存的使用,只有在运行虚拟机时,虚拟机才会使用内存。否则,它将可用于常规使用。 -Make sure that the rest of the settings match the example and click Create. +确保其余设置与示例匹配,并点击 Create。 ![Assign 15-20 GB of disk space in VDI format][14] -Before you click the start button of your virtual machine, you need to load the ISO as shown below [Optical Drive]. +在你点击虚拟机的 Start 按钮之前,你需要加载如下所示的 ISO [光驱]。 ![Add the Fedora ISO to optical drive storage][15] -As your virtual hard drive is empty, the virtual machine will boot from this ISO. Think of it as using a live USB or disk for installing Linux. +因为你的虚拟硬盘是空的,虚拟机将从这个 ISO 启动。可以把它看作是使用 live USB 或磁盘安装 Linux。 ![Go to Settings and add ISO as optical drive][16] -Then, if you have a multi-core CPU it is recommended to assign 2 or more cores for your virtual machine. You may find the CPU cores under the system tab. When you configure your system click ok and start the virtual machine. +然后,如果您有一个多核CPU,建议为虚拟机分配 2 个或更多的核。您可以在 system 选项卡下找到 CPU 核心。配置系统时,单击 ok 并启动虚拟机。 ![Optional step: Assign number of CPU cores][17] -Once you have configured everything, click on the start button to begin the installation. +配置好所有内容后,单击 start 按钮开始安装。 -#### Step 4: Install Fedora in VirtualBox +#### 步骤四:在 VirtualBox 中安装 Fedora。 -If you have followed the process correctly, when you start the virtual machine you will boot directly from the ISO file. When you see a similar to below screen select Start Fedora, and press the enter key. +如果您正确地遵循了这个过程,那么当您启动虚拟机时,您将直接从 ISO 文件启动。当您看到类似下面的屏幕时,选择 Start Fedora,并按 enter 键。 ![Fedora running in live environment in virtual machine][18] -To start the installation dialog box, click on Install to Hard Drive. +要启动安装对话框,单击 Install To Hard Drive。 ![Click on “install to hard drive”][19] -Before you proceed to the installation, it is essential to define your keyboard layout, your timezone and finally where the operating system will be installed. +在您继续安装之前,有必要定义您的键盘布局、您的时区以及最终安装操作系统的位置。 ![Choose keyboard, time and date and then go to Installation Destination][20] -The partitioning process is straight forward. You made some free space as VDI earlier. It should be automatically recognized. +划分过程很简单。您像前面的 VDI 那样划分一些空闲空间。它应该被自动识别。 -Select your disk and set the storage configuration to automatic. Click on Done to go to the previous dialog box. + +选择您的磁盘并将存储配置设置为 automatic。单击 Done 进入上一个对话框。 ![Disk should be automatically recognized][21] -Once you have configured the above, click on “Begin Installation”. +一旦你配置了上面的,点击 “Begin Installation”。 ![Begin installation of Fedora][22] -Now you just need to wait for five-six minutes for installation completion. Click on the “Finish installation” button when installation is finished. +现在只需等待 5 - 6 分钟即可完成安装。安装完成后,点击 “Finish installation” 按钮。 -As a last step, you need to power off your system. If you are unfamiliar with the GNOME desktop environment you can do it like so. +最后一步,需要关闭系统的电源。如果您不熟悉 GNOME 桌面环境,您可以这样做。 ![Turn off Fedora live environment after installation][23] -You have to manually unload the ISO file that you loaded at the initial steps. +您必须手动卸载在初始步骤中加载的 ISO 文件。 ![Remove Fedora ISO From Optical Drive][24] -The next time you start the virtual machine with Fedora, you will be prompted to create a user account and set your password for Fedora Linux. +下一次使用 Fedora 启动虚拟机时,系统将提示您为 Fedora Linux 创建用户帐户并设置密码。 -### Use VirtualBox guest additions for additional features like clipboard sharing, folder sharing and more +### 使用 VirtualBox 客户添加的附加功能,如剪贴板共享,文件夹共享等 -[Guest Additions][25] are designed to be installed inside a virtual machine post installation of the guest operating system. They contain device drivers and system applications that optimize the guest operating system for better performance and usability. +[增强功能包][25] 客户附加程序设计为在客户操作系统安装后安装在虚拟机中。它们包含对客户操作系统进行优化的设备驱动程序和系统应用程序,以获得更好的性能和可用性。 -The Guest Additions ISO file is mounted as a virtual CD-ROM in order to be installed. +客户添加 ISO 文件被安装为虚拟 CD-ROM 以便安装。 -This is a straightforward process. Simply click on the devices tab and then click on “Insert Guest Additions CD image” +这是一个简单的过程。只需单击设备选项卡,然后单击 “Insert Guest Additions CD image”。 ![][26] -You will be prompted to download the guest additions image, when prompt click on Download. +当提示符单击 download 时,系统将弹出您下载增强功能包界面。 ![Install VirtualBox Guest Additions][27] -#### **Shared clipboard** +#### **共享剪贴板** -At some point you’ll need to move some content between your virtual machine and the host operating system. The shared clipboard/drag and drop support will allow you to copy items on one platform and paste them on the other. +有时候,您需要在虚拟机和主机操作系统之间移动一些内容。共享剪贴板/拖放支持将允许您在一个平台上复制项目,并将它们粘贴到另一个平台上。 -To enable this feature, choose **Settings** on the VirtualBox home page and follow the instructions as below. I find the **Bidirectional** option the most convenient. +要启用此功能,请在VirtualBox主页上选择 **Settings**,并按照下面的说明操作。**双向** 的选项是最方便的。 ![Enable clipboard sharing between guest and host systems][28] -#### **Shared folders** +#### **共享文件夹** -There are two types of shares: +有两种类型的分享: - * Permanent shares, that are saved with the Virtual Machine settings. - * Transient shares, that are disappear when the Virtual Machine is powered off. These can be created using a checkbox in the VirtualBox Manager. + * 永久共享,与虚拟机设置一起保存。 + * 暂态共享,当虚拟机关闭时就会消失。可以使用 VirtualBox 管理器中的复选框创建暂态共享。 -In this tutorial, I will make a permanent shared folder. In the VM settings add the host system folder you want to share and choose the name that you want to appear at your VM. +在本教程中,我将创建一个永久共享文件夹。在 VM 设置中添加您想要共享的主机系统文件夹,并选择您想要在 VM 中出现的名称。 ![][29] -The next time you start the virtual machine, the folder should appear as a network drive. +下次启动虚拟机时,该文件夹应该显示为网络驱动器。 ![][30] -#### **Better video support** +#### **更好的视频支持** -While the virtual graphics card which Oracle VirtualBox provides all the basic features, the custom video drivers that are installed with the Guest Additions provide you with extra high and non-standard video modes, as well as accelerated video performance. +虽然 Oracle VirtualBox 提供了所有基本功能的虚拟显卡,但客户添加的自定义视频驱动程序为您提供了超高和非标准的视频模式,以及加速的视频性能。 -Using Guest Additions, the guest OS’s resolution will dynamically resize as you adjust the VirtualBox window on your computer. +使用增强安装包,操作系统的分辨率将随着您调整计算机上的 VirtualBox 窗口而动态调整大小。 -Finally, Guest Additions can take advantage of your computer’s graphics card. If you’re a gamer or using productivity software in a WM, this makes a huge difference. +最后,增强安装包可以利用您的计算机的显卡。如果你是一名游戏玩家或在 WM 中使用高效软件,这就会产生巨大的改变。 -#### USB and Network Devices sharing +#### USB 和网络设备共享 -With VirtualBox, users have the ability to use a fully-functional operating system, without having to do the setup on different hardware. However, sharing USB and network devices between the host and guest machine is not as straightforward as it should be. +有了 VirtualBox,用户就可以使用一个功能齐全的操作系统,而不必在不同的硬件上进行设置。然而,在主机和客户机器之间共享USB和网络设备并不像想的那样简单。 -To access USB devices, you will need to install [the VirtualBox extension pack][31]. +要访问USB设备,您将需要安装 [VirtualBox 扩展包][31]. ![Install VirtualBox Extensions pack][32] -_**This is for Linux only**_ because I am using all this in Linux. +_**下面这些仅对 Linux**_,因为我使用的是 Linux。 -In order for VirtualBox to have access to the USB subsystem, the user (on host system) running VirtualBox must belong to the vboxuser group. To do this, open up a terminal and issue the following command: +为了使 VirtualBox 能够访问 USB 子系统,运行 VirtualBox 的用户(在主机系统上)必须属于 vboxuser 组。为此,打开一个终端并发出以下命令: ``` sudo usermod -aG vboxusers 'your username' ``` -Once you run the command, you should either log out and log back in, or restart your host machine. +运行该命令后,您应该注销并重新登录,或者重新启动主机。 -At this step, plug in your USB stick and through your VM settings you should be able to find and add the medium as shown at the example. +在这一步,插入你的 u 盘,通过你的 VM 设置,你应该能够找到并添加介质,如例子中所示。 ![][33] -Your USB will be accessible the next time you start your virtual machine. +当您下次启动虚拟机,您的USB将是可访问的。 ![][34] -### Bonus Tip: Save and export the Virtual Machine so that you can use it later on any system +### 额外提示:保存并导出虚拟机,以便以后可以在任何系统上使用它 -You may want to use your virtual machine to another computer or it is time to build a new machine and you need to keep your virtual machine as it is. You can easily export your current setup and import it to another machine at a few easy steps. +您可能想在另一台计算机上使用虚拟机,或者是时候构建一台新机器了,并且您需要保持虚拟机的原样。只需几个简单的步骤,就可以轻松地导出当前设置并将其导入到另一台机器。 -At the VirtualBox home panel, click on file and the export appliance. If you prefer keyboard shortcuts, you can simply click **Ctrl+E**. +在 VirtualBox 主面板上,单击 file 和 export 工具。如果你喜欢键盘快捷键,你可以简单地点击 **Ctrl+E** ![][35] -Choose the virtual machine you want to export and click on next. +选择要导出的虚拟机,然后单击 next。 ![][36] -The Format option needs some attention. There are three different options of Open Virtualization Format 0.9, 1.0 and 2.0, which can be either ovf or ova extensions. +格式选项需要注意一下。开放虚拟化格式 0.9、1.0 和 2.0 有三种不同的选项,可以是 ovf 或 ova 扩展。 -With ovf extension, several files will be written separately, compared to ova extension, which combines all the files into one Open Virtualization Format archive. -The default format, Open Virtualization Format 1.0, should be fine. +使用 ovf 扩展名,可以分别编写几个文件,而 ova 扩展名则将所有文件合并到一个开放的虚拟化格式归档文件中。 + + +默认格式 Open Virtualization format 1.0 应该没问题。 ![][37] -To finish the process, click next and at the next dialog box click export. +要完成该过程,单击 next,然后在下一个对话框中单击 export。 -#### Conclusion +#### 总结 -By using a virtual machine you can’t just test an operating system but deploy a fully functioning system, equally comparable to a physical machine. Nowadays, hardware has become so powerful and affordable that most of its power is not being utilized. +通过使用虚拟机,您不仅可以测试操作系统,还可以部署与物理机器同等重要的功能完整的系统。如今,硬件已经变得如此强大和廉价,它的大部分功能都没有被利用。 -Through virtualization technology, you can use those wasted resources. The need for physical machines is reduced, and consequently the energy consumption is less. You can save money both from hardware and reduced running costs. -On a larger scale, server virtualization is more of a basic requirement than an advanced concept. +通过虚拟化技术,您可以使用这些浪费的资源。对物理机器的需求减少了,因此能源消耗也减少了。您可以从硬件和降低运行成本两方面省钱。 -I hope you found this tutorial helpful in installing Fedora Linux in VirtualBox. If you face any issues, please let me know in the comments. + +在更大的范围内,服务器虚拟化更多的是一种基本需求,而不是一种高级概念。 + + +我希望本教程对您在 VirtualBox 中安装 Fedora Linux 有帮助。如果你遇到任何问题,请在评论中告诉我。 -------------------------------------------------------------------------------- @@ -229,7 +235,7 @@ via: https://itsfoss.com/install-fedora-in-virtualbox/ 作者:[Dimitrios Savvopoulos][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[译者ID](https://github.com/frogOAO) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出