Linux ubuntu for virtualbox

How to run an Ubuntu Desktop virtual machine using VirtualBox 7

In this tutorial, we’ll walk you through one of the easiest ways to try out Ubuntu Desktop on a virtual machine. VirtualBox is a general purpose virtualiser that is available across Linux, Mac OS and Windows. It’s a great way to experience Ubuntu regardless of your current operating system.

VirtualBox 7 and above includes a new feature called Unattended Guest OS Install which significantly streamlines the setup experience for common operating systems like Ubuntu, making it easier than ever to get started.

Note: This tutorial will also work for other distributions, so try it out with some of the Ubuntu flavours as well!

What you’ll learn

  • How to install and configure VirtualBox
  • How to import an Ubuntu image
  • How to run a virtual instance of Ubuntu Desktop
  • Further configuration options

What you’ll need

Download an Ubuntu Image

You can download an Ubuntu image here. Make sure to save it to a memorable location on your PC! For this tutorial, we will use the latest Ubuntu 22.10 release.

image

Download and install VirtualBox

You can download VirtualBox from the downloads page here. This page includes instructions on how to install VirtualBox for your specific OS so we won’t repeat those here.

Once you have completed the installation, go ahead and run VirtualBox.

2. Create a new virtual machine

Click New to create a new virtual machine. Fill in the appropriate details:

  • Name: If you include the word Ubuntu in your name the Type and Version will auto-update.
  • Machine Folder: This is where your virtual machines will be stored so you can resume working on them whenever you like.
  • ISO Image: Here you need to add a link to the ISO you downloaded from the Ubuntu website.

We want to install Ubuntu unattendedly so we can leave the checkbox to skip unchecked.

Create a user profile

To enable the automatic install we need to prepopulate our username and password here in addition to our machine name so that it can be configured automatically during first boot.

The default credentials are:

It is important to change these values since the defaults will create a user without sudo access.

Читайте также:  Linux mysql client gui

Ensure your Hostname has no spaces to proceed!

It is also recommended to check the Guest Additions box to install the default Guest Additions ISO that is downloaded as part of VirtualBox. Guest additions enables a number of quality of life features such as changing resolution and dynamic screen resizing so it is highly recommended!

Note: If you choose not to use unattended install then this step will be skipped and you will go straight to the following screen. Once your machine has been created you will be able to create a username and password by proceeding through the standard Ubuntu Desktop installation flow on first boot.

Define the Virtual Machine’s resources

In the next section we can specifiy how much of our host machine’s memory and processors the virtual machine can use. For good performance it’s recommended to provide your VM with around 8GB of RAM (althought 4GB will still be usable) and 4 CPUs. Try to remain in the green areas of each slider to prevent issues with your machine running both the VM and the host OS.

Then we need to specify the size of the hard disc for the virtual machine. For Ubuntu we recommend around 25 GB as a minimum. By default the hard disk will scale dynamically as more memory is required up to the defined limit. If you want to pre-allocate the full amount, check the ‘Pre-allocate Full Size’ check box. This will improve performance but may take up unnecessary space.

Click Next to continue and view a summary of your machine setting.

After this click Finish to initialize the machine!

3. Install your image

Click Start to launch the virtual machine.

You will see a message saying ‘Powering VM up …’ and your desktop window will appear.

On first boot the unattended installation will kick in so do not interact with the prompt to ‘Try and Install Ubuntu’ and let it progress automatically to the splash screen and into the installer.

Note: If you chose not to use unattended install then you will need to progress through the Ubuntu install manually. Check out our Ubuntu Desktop installation tutorial for more details.

You will notice at this stage that the resolution of the window is fixed at 800×600. This is because the Guest Additions features are not installed until after the Ubuntu installation has completed.

Once the installation completes, the machine will automatically reboot to complete the installation.

Finally you will be greeted with the Ubuntu log-in screen where you can enter your username and password defined during the initial setup (don’t forget that the default password is ‘changeme’ if you left everything as the default).

4. Explore Virtual Box

Enjoy your shiny new Ubuntu Desktop!

As always we recommend opening a terminal and running sudo apt update && sudo apt upgrade -y and then sudo snap refresh to get everything updated to the latest versions.

Читайте также:  Как установить на linux агента

Once you’ve finished your session you can close your machine by clicking the X in the top right of the window and choosing whether to keep your machine frozen in its current state or shut it down completely.

As you can probably tell, there are tonnes of further configuration options available in VirtualBox and we’ve only scratched the surface.

VirtualBox allows you to create and configure multiple virtual machines, so don’t be afraid to create new instances of Ubuntu to try out different system and storage configurations to fine tune your performance.

Why not try following the tutorial above with one of the Ubuntu flavours!

image

5. Tell us your thoughts!

Thank you for following this tutorial, we’d love to hear how you got on.

Give us feedback in the Ubuntu Discourse if you have any issues.

To help us improve our tutorials, we’d love to hear more about you:

How will you use this tutorial?

Источник

How to Install Ubuntu 22.04 on VirtualBox

The Canonical developers are about to release their latest version of Ubuntu in April 2022 which will be referred to as Ubuntu 22.04. The beta version of the system has been released and we performed certain steps to install this version on the VirtualBox. Installation of the other stable versions will be similar to the one discussed here.

Therefore, if you wish to learn the installation procedure of Ubuntu 22.04 on VirtualBox then read the article till the end.

How to Install Ubuntu 22.04 on VirtualBox

Installing Ubuntu 22.04 on VirtualBox requires some steps which have been summed up in the following guide along with demonstrations by means of screenshots.

Step 1: Download ISO

The foremost requirement of installing Ubuntu 22.04 is to have an ISO file. For the purpose of downloading this file visit the official Ubuntu 22.04 LTS (Jammy Jellyfish) Daily Build page.

Each of the highlighted ISO files indicates the type of computer systems they are built for. Download the type that fits your computer.

Step 2: Install VirtualBox

Another basic requirement for installing Ubuntu 22.04 on an existing operating system is to have a VirtualBox. Windows users can visit the official web page and download the setup from there, whereas Linux users have to use the following command to install VirtualBox on their system.

Step 3: Generate Virtual Machine

Now run the application. When you do that you would require to create a virtual machine.

1. Click on the ‘New’ button to generate a new virtual machine.

2. Write your machine name and set its type and version as indicated in the screenshot.

3. Set the RAM for the VM. You choose the RAM of your choice but for the machine to work in a better way we recommend assigning RAM of 4GB.

4. Now select the second option and click create.

Читайте также:  Oracle linux rdp client

5. Select the by default option which is VDI, however if you wish to utilize Virtual Hard Disk then you can choose VHD option.

6. Now choose the ‘Dynamically allocated’ option which makes the hard disk to take up only the required amount of space.

7. Now allocate space according to your requirements(e.g. 30GB) and create the virtual machine.

Step 4: Get the machine started

After performing the above steps your machine will be created and will appear on the sidebar menu. Now select that particular machine and press start.

Step 5: Include ISO in VirtualBox

In order to boot the machine include the downloaded ISO file that will act as a startup disk.

A pop up will appear when you click the folder option. Now first click on the add button as indicated in the screenshot.

A window will open up and from there select the downloaded file.

Now finally select the ‘choose’ option.

Once the file is added, press the start button.

Step 6: Grub Menu

Once the machine is started, you will see the Grub menu, from there select the ‘Ubuntu’ option by pressing “Enter” to boot the machine.

Step 7: Install Ubuntu

To install Ubuntu select the ‘Install Ubuntu’ option, whereas, if you just want to experience Ubuntu in a live environment then go for the ‘Try Ubuntu’ option.

Select the language you prefer. For instance, here we have selected the ‘English(US)’ option. Once the language is selected press the ‘continue’ option.

Step 8: Installation Options

Now when you come to this step you either have to select the ‘Normal Installation’ option or the ‘Minimal Installation’ option depending upon your requirements. Moreover, if you are a GPU user then also select the last option.

Step 9: Erase disk

For this step choose “Erase Disk and install Ubuntu” option(Don’t worry, it won’t delete any of your guest operating system’s data).

Step 10: Set User Account

Once you continue, the system will start to install Ubuntu 22.04 and finish in a while and you will be asked to restart your system.

After successful restart of the system, you wil have the fresh new look of the Ubuntu 22.04 on your Virtual Box.

Following these steps, you can successfully install Ubuntu 22.04 on your VirtualBox.

Conclusion

Installing Ubuntu 22.04 on VirtualBox requires downloading the ISO file and creating a virtual machine on the VirtualBox. Once done you are now supposed to start the machine and include the downloaded ISO file in it. After this, you need to install Ubuntu and set up various installation options. Lastly, install the guest additions using certain commands and you are good to go.

About the author

Naima Aftab

I am a software engineering professional with a profound interest in writing. I am pursuing technical writing as my full-time career and sharing my knowledge through my words.

Источник

Оцените статью
Adblock
detector