Run Linux On Windows Or Mac With a Virtual Machine (VM)

Installing a virtual machine on a Microsoft® Windows® or Macintosh® computer enables you to run Linux® on that computer as a guest operating system. You have probably heard of the virtual machine named "Parallels" that enables users to run Windows on a Mac. Another virtual machine example is the VirtualBox. It enables Linux to run on a Windows or Mac host.

1 Download VirtualBox and Ubuntu Installer

Download VirtualBox and the Linux distribution of your choice. Some popular Linux distributions include Fedora and Debian. If you want to run Linux on an old computer, Puppy Linux or Lubuntu may be a better choice. We have chosen to use Ubuntu for this example.

VirtualBox download:
VirtualBox Home Page  

Ubuntu download:
Ubuntu Download Page  

We recommend you choose the most recent Long Term Support (LTS) version and 32-bit. The 32-bit version will probably run faster in a Virtual Machine (VM), even if you have a 64-bit computer.

2 Install and Open VirtualBox

Execute the VirtualBox install program then start VirtualBox.
Click Next to use all default settings.

VirtualBox_install_1.png
Click image to enlarge

3 Create a New VM

1

Click the New button.

VirtualBox_install_2.png
Click image to enlarge

2

Provide a descriptive name for the new VM.

VirtualBox_install_3.png
Click image to enlarge

3

Select the amount of Random Access Memory (RAM) to be allocated to the VM.

VirtualBox_install_4.png
Click image to enlarge

4

Create a virtual hard disk.

VirtualBox_install_5.png
Click image to enlarge

5

Select the hard disk file type.

VirtualBox_install_6.png
Click image to enlarge

6

Choose to dynamically increase the physical hard disk space as the virtual hard disc needs it.

VirtualBox_install_7.png
Click image to enlarge

7

Select a file name and maximum size of the virtual hard disk.

VirtualBox_install_8.png
Click image to enlarge

4 Provide Location of Ubuntu Install File (ISO)

1

Click the Settings button.

VirtualBox_install_9.png
Click image to enlarge

2

Click the Storage button, then Empty (under Controller: IDE), and check the box beside Live CD/DVD.

VirtualBox_install_10.png
Click image to enlarge

3

Browse to the Ubuntu install file.
Click the CD/DVD image button, click Choose Virtual Optical Disk File…, then browse to the Ubuntu ISO file you downloaded in step 1 above. Click OK.

VirtualBox_install_11.png
Click image to enlarge

5 Start the Virtual Machine to Install Ubuntu

1

Click the Start button.
This starts your VM. Imagine starting a computer with the Ubuntu install disc in the CD/DVD drive. Please be patient as the virtual install DVD is read. You may see some error and other information messages. These can probably be disregarded.

VirtualBox_install_12.png
Click image to enlarge

2

Click Install Ubuntu.
This might scare you, but don't worry. You are installing a virutal operating system which will not affect your native operating system. This virtual operating system will be installed on the virtual hard disc you created in step 3.7 above.

VirtualBox_install_13.png
Click image to enlarge

3

Check the two boxes to download software and click Continue.

VirtualBox_install_14.png
Click image to enlarge

4

Select Erase disk and install Ubuntu then click Install Now.
I'm sure you are afraid to do this but have faith. It will be OK. This will only affect the virtual hard disc you created in step 3.4 through 3.7 above.
You will see a message about making changes to the disks. Click Continue.

VirtualBox_install_15.png
Click image to enlarge

5

Select your location and click Continue.

VirtualBox_install_16.png
Click image to enlarge

6

Select your keyboard layout and click Continue.

VirtualBox_install_17.png
Click image to enlarge

7

Enter the information requested and click Continue.
Please be patient as the operating system is installed.

VirtualBox_install_18.png
Click image to enlarge

8

Click Restart Now when the installation completes, then press Enter at the prompt.
You may see some warning messages as the virtual machine restarts. Disregard them. You will be asked to remove your virtual installation disc from the virtual CD/DVD drive. Pretend to do this, then press Enter (carriage return).

VirtualBox_install_19.png
Click image to enlarge

9

Ready to use!
Enter the password you created in step 4.7 above to log in. Ubuntu is now running in the VirtualBox virtual machine on your original operating system. You will need to wait a short time while the desktop loads.

VirtualBox_install_21.png
Click image to enlarge

6 Resize Ubuntu Window (Optional)

1

Look for a CD icon (left side) labeled "VBOXADDITIONS…"
If it is there, right click to eject it. You will see it disappear and a message will be displayed letting you know it is ejected.

VirtualBox_install_25.png
Click image to enlarge

2

Click the Devices menu (top of window) and select Insert Guest Additions CD image….
A message box will open asking if you want to automatically run the software on the virtual CD. Click Run. An Authenticate box will open. Enter your password and click the Authenticate button. This will start the VirtualBox Guest Additions software installation. Press Enter to close the window when complete.

VirtualBox_install_30.png
Click image to enlarge

3

Shut down the Ubuntu virtual machine then exit and restart VirtualBox.
Click the power icon (top right corner) to shut down Ubuntu.

VirtualBox_install_26.png
Click image to enlarge

4

Restart the Ubuntu VM and click the System Settings icon on the left, then Displays.

VirtualBox_install_27.png
Click image to enlarge

5

Change the resolution and click Apply.
Now the resolution can be changed using the drop down selections. Click the Apply button (lower right corner) after you've changed the resolution.

VirtualBox_install_28.png
Click image to enlarge
© 2020 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.