[手动选题][tech]: 20230112.3 ️ Install Ubuntu on Windows Using VirtualBox [Complete Guide].md

This commit is contained in:
六开箱 2023-01-14 11:19:51 +08:00
parent 55061a8dcd
commit 64fa5e7135

View File

@ -0,0 +1,241 @@
[#]: subject: "Install Ubuntu on Windows Using VirtualBox [Complete Guide]"
[#]: via: "https://www.debugpoint.com/install-ubuntu-windows-virtualbox/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Install Ubuntu on Windows Using VirtualBox [Complete Guide]
======
**This tutorial will guide you through the easiest steps to install an Ubuntu desktop on Windows using Oracle VirtualBox.**
[VirtualBox][1] is a popular virtualization software by Oracle which is available for Linux, mac and Windows systems. It is flexible and brings many features to take advantage of your virtualization. Its the best and easy way to experience Ubuntu in Windows without installing it. However, I strongly recommend installing Ubuntu physically as a dual-boot to enjoy its advantage.
The steps outlined below assume that you are installing Ubuntu for the first time in Windows. Hence the steps are a little descriptive and a bit lengthy. Furthermore, the following steps should work for Windows 10 and Windows 11 as host machines.
### Contents
- [Pre-requisite][2]
- [Download Ubuntu ISO and VirtualBox set-up files][3]
- [Install VirtualBox on Windows (Host)][4]
- [Install Ubuntu (Guest) on VirtualBox][5]
- [Guest addition installation and tips][6]
### What youll need
- A PC with internet access
- Ubuntu Linux ISO image file for installation
- Windows system with VirtualBox installed
### Install Ubuntu on Windows Using VirtualBox
#### Download and install the necessary items
- Download the Ubuntu Linux desktop ISO image file from the following link.
[Download Ubuntu Desktop][7]
- Also, download the Oracle VirtualBox installer from the official website below.
[Download VirtualBox][8]
![Download location for VirtualBox for Windows][9]
#### How to install and configure VirtualBox
VirtualBox in Windows requires Microsoft Visual C++ 2019 Redistributable package. And you have to install it first. Download the package (under X64 architecture) from the below link:
[Download][10]
![Download the dependency for VirtualBox][11]
![Install the dependency for VirtualBox][12]
- After the above installation is complete, download the latest Python package from the below link. Python bindings are also a dependency for VirtualBox installation on Windows.
[Download Python for Windows][13]
- Then, launch the VirtualBox installation and follow the onscreen instructions to install it.
- After installation, restart your Windows system again.
#### Set up a virtual machine for Ubuntu
- Launch VirtualBox from the start menu.
![Select VirtualBox from start menu][14]
- On the VirtualBox window toolbar, click **New**.
- On the **Create VirtualBox** window, give the name of your virtual machine. It can be any name which identifies this version of Ubuntu.
- Keep the **Folder Name** unchanged. This is the path where the virtual machine file will be created.
- In the ISO Image field, browse the Ubuntu ISO file you downloaded.
- And select the Unattended installation. If you un-select this, a [default user id (vboxuser) and password][15] will be created in your virtual machine. Lets not follow it for now.
![Click on New][16]
![Select the ISO file][17]
- Click on Hardware and select the RAM you want for your virtual box. A thumb rule is that your VMs RAM size should be less than your physical RAM in the host system. I would recommend using 2 GB to 4 GB for a virtual machine for an 8 GB RAM system. For 4 GB RAM, use the slider (or type in) to make it 4096 MB (i.e. 4*1024).
- Choose processor as 2 or 4.
- Click on the Hard Disk section, and keep the file location unchanged.
- Give a minimum of 20GB to 25GB for Ubuntu installation.
- The hard disk file type value keeps as VDI (VirtualBox Disk Image)
- Do not select the pre-allocate full size.
- And finally, click on Finish.
![Select Hardware][18]
![Select Hard Disk][19]
- You should see a new entry at the left panel of VirtualBox with an Ubuntu 22.04 entry (the name which you gave above).
- Select the entry and click on Start to boot into the virtual machine
![Boot Ubuntu in VirtualBox][20]
#### Install Ubuntu using VirtualBox
- After a successful boot, you should see the following screen, which shows various options for installing Ubuntu. Select **Try or install Ubuntu**.
- In the Welcome screen, click on **Try Ubuntu**. And after a few moments, you should see the following Ubuntu LIVE desktop. If you want to change the resolution, right-click on the desktop and select Display settings. And change the resolution to 1400×900.
- On the desktop, double-click on “**Install Ubuntu**…”.
![Select Try Ubuntu][21]
![Ubuntu LIVE desktop][22]
- In the next set of screens, select Language and Keyboard Layout as your needs.
- The Install screen provides you with the type of installation you need. Select Normal Installation, and select both options under Other options.
- Since you are installing in the virtual disk space, i.e. which is just a file, you can safely choose the “Erase disk and install Ubuntu” option.
- Hit Install Now and Continue.
![Select Language][23]
![Select Keybaord Layout][24]
![Select install options][25]
![Installation Type][26]
![Write changes to disk][27]
- Then select region, add name, user and password. This will be your user id and password to log on to Ubuntu after installation.
- Hit continue to start the installation. Wait until it finishes.
![User account creation][28]
![Ubuntu Installation is complete][29]
Click on Restart Now after the installation is complete. Wait for a few seconds and you should see a login screen. Use the user id and password to log in. And you should see Ubuntu desktop is running inside VirtualBox as VM in Windows.
![Log on to Ubuntu][30]
![Ubuntu running in Windows using Virtualbox][31]
### Post-install configuration and tips (optional)
#### Install Guest Additions
After the successful installation, you should install the **VirtualBox guest additions** for Windows Host and Ubuntu Guest. The guest addition is a set of packages you need to install inside the guest VM (i.e. Ubuntu) to enable **shared folders, bi-directional copy/paste, automatic resolution change,** and many such features.
To install it, boot into Ubuntu. From the VirtualBox menu, select `Devices > Insert Guest Additions CD Image`. The necessary packages will be mounted inside Ubuntu.
![Select Guest addition from the menu][32]
Open the file manager and open the mounted folder as shown below. And then right-click > select `open in terminal`.
Then run the following command:
```
sudo ./VBoxLinuxAdditions.run
```
![Open the mounted disc and select option with terminal][33]
![VirtualBox guest addition install for Windows host][34]
After the above command is complete, restart Ubuntu VM.
#### Enable Copy and paste between Windows and Ubuntu
- To enable the copy and paste between Windows and Ubuntu systems, select `Devices > Shared Clipboard > Bi-directional` from the menu.
![Enable clipboard sharing][35]
#### Shutting down Ubuntu VM
- Ideally, you should shut down a VM from its own power off menu. However, you can also shut down from the main VirtualBox window. Right-click on the VM name and select `Close > Poweroff`.
![Poweroff Virtual machine][36]
#### How to delete Ubuntu and remove all data
- If you want to delete the Virtual machine entirely (.e.g. Ubuntu) and its data, select `Remove` and `delete all files`.
![Select remove to delete a VM][37]
![Select the delete options][38]
### Close notes
In this tutorial, you learned the easiest way to install Ubuntu on Windows (10 or 11) using VirtualBox. Also, you learned several post-install basic steps to configure the Ubuntu VM. You can use the above steps for any other Linux distributions in VirtualBox.
Feel free to comment below if you have any problems or questions.
[Next:How to Install Python on Windows [Beginners Guide]][39]
[_Using Mastodon? Follow us at floss.social/@debugpoint_][40]
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/install-ubuntu-windows-virtualbox/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://www.debugpoint.com/tag/virtualbox
[2]: https://www.debugpoint.com#presteps
[3]: https://www.debugpoint.com#download-items
[4]: https://www.debugpoint.com#install-virtualbox
[5]: https://www.debugpoint.com#install-ubuntu
[6]: https://www.debugpoint.com#post-install-steps
[7]: https://ubuntu.com/download/desktop
[8]: https://www.virtualbox.org/wiki/Downloads
[9]: https://www.debugpoint.com/wp-content/uploads/2023/01/Download-location-for-VirtualBox-for-Windows.jpg
[10]: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170
[11]: https://www.debugpoint.com/wp-content/uploads/2023/01/Download-the-dependency-for-VirtualBox.jpg
[12]: https://www.debugpoint.com/wp-content/uploads/2023/01/Install-the-dependency-for-VirtualBox.jpg
[13]: https://www.python.org/downloads/windows/
[14]: https://www.debugpoint.com/wp-content/uploads/2023/01/Select-VirtualBox-from-start-menu.jpg
[15]: https://www.debugpoint.com/virtualbox-id-password/
[16]: https://www.debugpoint.com/wp-content/uploads/2023/01/Click-on-New.jpg
[17]: https://www.debugpoint.com/wp-content/uploads/2023/01/Select-the-ISO-file.jpg
[18]: https://www.debugpoint.com/wp-content/uploads/2023/01/Select-Hardware.jpg
[19]: https://www.debugpoint.com/wp-content/uploads/2023/01/Select-Hard-Disk.jpg
[20]: https://www.debugpoint.com/wp-content/uploads/2023/01/Boot-Ubuntu-in-VirtualBox.jpg
[21]: https://www.debugpoint.com/wp-content/uploads/2023/01/1-Select-Try-Ubuntu.jpg
[22]: https://www.debugpoint.com/wp-content/uploads/2023/01/2-Ubuntu-LIVE-desktop-1.jpg
[23]: https://www.debugpoint.com/wp-content/uploads/2023/01/Select-Language.jpg
[24]: https://www.debugpoint.com/wp-content/uploads/2023/01/4-Select-Keybaord-Layout.jpg
[25]: https://www.debugpoint.com/wp-content/uploads/2023/01/5-Select-install-options.jpg
[26]: https://www.debugpoint.com/wp-content/uploads/2023/01/6-Installation-Type.jpg
[27]: https://www.debugpoint.com/wp-content/uploads/2023/01/7-Write-changes-to-disk.jpg
[28]: https://www.debugpoint.com/wp-content/uploads/2023/01/8-User-account-creation.jpg
[29]: https://www.debugpoint.com/wp-content/uploads/2023/01/10-Ubuntu-Installation-is-complete.jpg
[30]: https://www.debugpoint.com/wp-content/uploads/2023/01/11-Log-on-to-Ubuntu.jpg
[31]: https://www.debugpoint.com/wp-content/uploads/2023/01/12-Ubuntu-running-in-Windows-using-Virtualbox-2048x1280.jpg
[32]: https://www.debugpoint.com/wp-content/uploads/2023/01/Select-Guest-addition-from-the-menu.jpg
[33]: https://www.debugpoint.com/wp-content/uploads/2023/01/Open-the-mounted-disc-and-select-option-with-terminal.jpg
[34]: https://www.debugpoint.com/wp-content/uploads/2023/01/VirtualBox-guest-addition-install-for-Windows-host.jpg
[35]: https://www.debugpoint.com/wp-content/uploads/2023/01/Enable-clipboard-sharing.jpg
[36]: https://www.debugpoint.com/wp-content/uploads/2023/01/Poweroff-Virtual-machine.jpg
[37]: https://www.debugpoint.com/wp-content/uploads/2023/01/Select-remove-to-delete-a-VM.jpg
[38]: https://www.debugpoint.com/wp-content/uploads/2023/01/Select-the-delete-options.jpg
[39]: https://www.debugpoint.com/install-python-windows/
[40]: https://floss.social/@debugpoint