03. Installing Linux through VirtualBox

Once you're done selecting your distro, you'll need to install Linux. There are several ways you can go about getting Linux on your computer.

If you're new to Linux, and want to test the waters before committing, we recommend you download VirtualBox. Essentially, this allows you to run another OS within your main OS.

Advantages & Disadvantages

The advantages of installing through VirtualBox include:

  • No need to reboot to get to other OS.
  • You don't need to install various device drivers or worry about networking connections, as VirtualBox will provide you with its own.
  • For debugging purposes, or if you have any problems with your OS, you can just use your main OS.
  • No need to commit - if something goes wrong or you don't like the particular distro, just delete the virtual box image and install a new one.

The disadvantages are as follows:

  • If you do decide to full-commit, you'll have to partition your hard drive and install it again.
  • VirtualBox images only use a subset of your system's resources, which may result in system lag and suboptimal performance.

Installation Process

Firstly, install VirtualBox and head over to your distro's webpage to download the .iso file. In this case, we'll install Ubuntu Desktop.

Setup on Virtualbox

Once you're in the VirtualBox, click on New button.

Click on New, found on the upper-left corner.
Click on New to start up a new VirtualBox image.

Select the amount of RAM you want to allocate. Recall that this is the amount of space that current programs will have access to as they are running. If your system has fewer than 2 GB, use the 512 MB option. If it has 4 GB or more, go for 1 GB.

Select the amount of memory you want. Since we have 4 GB of RAM, we chose 1 GB.
Select the amount of memory you want. Since we have 4 GB of RAM, we chose 1 GB.

Now you can choose how large of a hard drive you want. 8 GB is just enough to get started. Select Create a virtual hard drive now and continue.

Opt to create a hard drive now.
Opt to create a hard drive now.

Select VDI (VirtualBox Disk Image) and hit Continue.

Select VDI unless you really know what you're doing.
Select VDI unless you really know what you're doing.

If you think that 8 GB won't be enough to toy around with, you may opt to Dynamically allocate this size. However, we hope that by the time you're willing to expand from a 8 GB fixed size, you'll also want to fully commit and install Linux on your hard drive itself. We'll choose Fixed size.

We'll choose to have a Fixed size image, as we're using the VirtualBox just to test the waters.
We'll choose to have a Fixed size image, as we're using the VirtualBox just to test the waters.

Now click Create and your virtual Hard Drive should be created.

Select the amount of memory you want. Since we have 4 GB of RAM, we chose 1 GB.
Select the amount of memory you want. Since we have 4 GB of RAM, we chose 1 GB.

Now when you start your VirtualBox, you'll be able to choose the .iso image that you downloaded previously. Load that up and you should be ready to go!

Select the amount of memory you want. Since we have 4 GB of RAM, we chose 1 GB.
Select the amount of memory you want. Since we have 4 GB of RAM, we chose 1 GB.

Installing directly onto your Hard Drive

If you're more committed to using Linux, then you could partition your current hard drive and install Linux that way. This method involves using a USB device to copy a Linux distro and booting your computer through the USB.

If you've already committed and are interested in installing Linux directly to your hard drive, do a quick Google search on how to do so. Otherwise, we'll cover it later on when we learn about Partitions.

Want to avoid becoming a code monkey?

The Clean Coder

Want to avoid becoming a code monkey? Try Good Practice

This book is packed with practical advice about everything from estimating and coding to refactoring and testing. It covers not only technique, but also attitude, as it shows how to approach software development with honor, self-respect, and pride; communicate and estimate faithfully; and understand that deep knowledge comes with a responsibility to act.

$ Check price
44.9944.99Amazon 4.5 logo(427+ reviews)

More Good Practice resources

Take your Linux skills to the next level!

How Linux Works

Take your Linux skills to the next level! Try Linux & UNIX

In this completely revised second edition of the perennial best seller How Linux Works, author Brian Ward makes the concepts behind Linux internals accessible to anyone curious about the inner workings of the operating system. Inside, you'll find the kind of knowledge that normally comes from years of experience doing things the hard way.

$ Check price
39.9539.95Amazon 5 logo(114+ reviews)

More Linux & UNIX resources

Ad