14.2.13 Lab – Install Linux in a Virtual Machine and Explore the GUI Answers

Same for: 2.2.3 Lab – Install Linux in a Virtual Machine and Explore the GUI
9.1.2.5 Lab – Install Linux in a Virtual Machine and Explore the GUI

14.2.13 Lab – Install Linux in a Virtual Machine and Explore the GUI Answers

Objectives

  • Part 1: Prepare a Computer for Virtualization
  • Part 2: Install a Linux OS on the Virtual Machine
  • Part 3: Explore the GUI

Background / Scenario

Computing power and resources have increased tremendously over the last 10 years. A benefit of multi-core processors and large amounts of RAM is the ability to install multiple operating systems through the use of virtualization on a computer.

With virtualization, one or more virtual computers can operate inside one physical computer. Virtual computers that run within physical computers are called virtual machines. Virtual machines are often called guests, and physical computers are often called hosts. Anyone with a modern computer and operating system can run virtual machines.

In this lab, you will install a Linux OS in a virtual machine using a desktop virtualization application, such as VirtualBox. After completing the installation, you will explore the GUI interface. You will also explore the command line interface using this virtual machine in a lab later in this course.

Required Resources

  • Computer with a minimum of 2 GB of RAM and 10 GB of free disk space
  • High-speed Internet access to download Oracle VirtualBox 7.0 and Linux OS image, such as Ubuntu Desktop

Instructions

Part 1:Prepare a Computer for Virtualization

In Part 1, you will download and install desktop virtualization software and a Linux OS image. Your Answers may provide you with a Linux OS image.

Step 1:Download and install VirtualBox 7.0.

VMware Player and Oracle VirtualBox are two virtualization programs that you can download and install to support the OS image file. In this lab, you will use the VirtualBox application.

1. Navigate to https://www.virtualbox.org/. Click the download link on this page.

2. Choose and download the appropriate installation file based on your operating system.

3. After the VirtualBox installation file is downloaded, run the installer and accept the default installation settings.

Step 2:Download a Linux Image.

1. Navigate to the Ubuntu website at https://ubuntu.com/desktop. Click the Download link on this page to download and save an Ubuntu Desktop image.

Download Ubuntu Desktop 22.04.4 (Recommended version): https://releases.ubuntu.com/22.04/

Step 3:Create a New Virtual Machine.

1. Click Start/Windows and search for Virtualbox. Click Oracle VM VirtualBox to open the manager. When the manager opens, click New to start the Ubuntu installation.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 32

2. In the Virtual machine Name and Operating System screen, type Ubuntu in the Name field.
In the Folder field, browse to an empty folder that you created earlier, this is the folder that will contain the virtual machine files, it will take up about 4GB after installation.
For the Type field, select Linux.
In the Version field, select the corresponding downloaded version.
Click Next to continue.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 33

3. In the Memory size screen, increase the amount of RAM as long as the amount of RAM for the virtual machine is in the green area. Going beyond the green area would adversely affect the performance of the host. Click Next to continue.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 34

4. In the Virtual Hard disk screen, click Create a virtual hard disk now. Click Next to continue.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 35

In the Summary screen, click Finish to continue.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 36

Steps 5 through 8 only apply to older versions of VirtualBox:
5. In the Hard disk file type screen, use the default file type settings of VDI (VirtualBox Disk Image).

6. In the Storage on physical hard disk screen, use the default storage settings of dynamically allocated. Click Next to continue.

7. In the File location and size screen, you can adjust the hard drive and change the name and location of the virtual hard drive. Click Create to use the default settings.

8. When the hard drive creation is done, the new virtual machine is listed in the Oracle VM VirtualBox Manager window. Select Ubuntu and click Start in the top menu.

Part 2: Install Ubuntu on the virtual machine

Step 1:Mount the Image.

1. In the Oracle VM Virtualbox Manager window. Right-click Ubuntu and select Settings.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 37

In the Ubuntu – Settings window, click Storage in the left pane. Click Empty in the middle panel. In the right pane, click the CD symbol and select the file location of the Ubuntu image (ubuntu-22.04.4-desktop-amd64.iso). Click OK to continue.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 38

14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 39

14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 40

14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 41

14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 42

2. In the Oracle VM VirtualBox Manager window, click Start in the top menu.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 43

Step 2:Install the OS.

1. In the Welcome screen, you are prompted to Try or install Ubuntu. The try option does not install the OS, it runs the OS straight from the image. In this lab, you will install the Ubuntu OS in this virtual machine. Select Try or install Ubuntu.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 44
Click to Install Ubuntu
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 45

2. Follow the on-screen instructions and provide the necessary information when prompted.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 46

With these options, the installation process will be accelerated.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 47

Note: If you are not connected to the Internet, you can continue to install and enable the network later.

3. Because this Ubuntu installation is in a virtual machine, it is safe to erase the disk and install Ubuntu without affecting the host computer. Select Erase disk and install Ubuntu. Otherwise installing Ubuntu on a physical computer would erase all data on the disk and replace the existing operating system with Ubuntu. Click Install Now to start the installation.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 48

4. Click Continue to erase the disk and install Ubuntu.

5. In the Who are you? screen, provide your name and choose a password. You can use the username generated or enter a different username. Enter your desired username and password. If desired, you can change the other settings. Click Continue.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 49
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 50
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 51

6. The Ubuntu OS is now installing in the virtual machine. This will take several minutes. When the Installation is complete message displays.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 52
Return to the Oracle VM Virtualbox Manager window. Right-click Ubuntu and select Settings. In the Ubuntu – Settings window, click Storage in the left pane. Click the mounted Ubuntu image in the middle pane. In the right panel, click the CD symbol and click Remove Disk from Virtual Drive. Click OK to continue.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 53

7. In the Ubuntu VM, click Restart Now.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 54

Part 3:Explore the GUI

In this part, you will install the VirtualBox guest additions and explore the Ubuntu GUI.

Step 1:Install Guest Additions.

1. Log on to your Ubuntu virtual machine using the user credentials created in the previous part.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 55

2. Your Ubuntu Desktop window may be smaller than expected. This is especially true on high-resolution displays. Click Device > Insert Guest Additions CD image… to install the Guest Additions. This allows more functions, such as changing the screen resolution in the virtual machine.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 56

3. Click Run to install the additions. When prompted for a password, use the same password that you used to log on. Click Authenticate to continue.

4. If the computer was not connected to the Internet during the installation, click Devices > Network Settings in the Oracle VirtualBox menu. Enable network adapters and configure the proper setting for network connections as necessary. Click OK.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 57

5. When the installation of the additions is done, restart the virtual machine again. Click the menu in the upper-right corner and click Shut down. Click Restart to restart Ubuntu.
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 58

Step 2:Open a web browser.

1. Log on to Ubuntu again. After you are logged on again, you can resize the virtual machine window.

2. Open a web browser. Depending on the Linux distribution, you may need to search for a web browser or there is a link to a web browser already on the Desktop.

14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 59

Search for a web browser


14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 60

Link to a web browser already on the Desktop


3. Locate a terminal emulator to access the command line interface. You will be using a terminal emulator in later labs.
Right click to Desktop –> Select Open in Terminal
14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 61

14.2.13 Lab - Install Linux in a Virtual Machine and Explore the GUI Answers 62

Search for Terminal app


4. Explore the installed Linux distribution and locate a few applications that you may use.

Reflection Question

What are the advantages and disadvantages of using a virtual machine?

With a virtual machine, you are able to test new applications or operating systems without affecting your host machine. You are also able to save the current machine state when you close the virtual machine. If you have any issues, you have the option to revert the virtual machine to a previously saved state. On the other hand, a virtual machine requires hardware resources from the host machine, such as hard drive space, RAM, and processing power.

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments