How to write a novel

How to run Ubuntu in a virtual machine

Sometimes I find a great piece of software on the web, but it's designed to run on Linux. I do have a dual-boot setup where I can shut down my PC and restart it using Ubuntu Linux, but it's a hassle when I just want to run a quick shell script or a utility.

Fortunately there's an answer: virtual machines! You'll need to download and install virtualbox for your current operating system, be that OSX or Windows or Linux. (Yes, you can run Linux inside Linux if you want to.)

Once you've installed Virtualbox you'll need an operating system to install. You can install any flavour of Linux or Windows (the latter assuming you have a new, unused license). For this example we'll use Ubuntu Linux.

You can grab the latest version of Ubuntu here. (It's fairly large - around 700mb)

That will download an ISO file, which is a copy of the CD. You can't open it or access the contents, but you can 'mount' it just like a physical hard drive or memory stick. This is how:

First, use the Virtualbox menu to create a new virtual machine, then attach the ISO you downloaded as a CD rom. Next, create a virtual hard drive. I suggest 10 or 20 gigs, but make sure it's set to Dynamic.

Start the virtual machine and you'll be presented with the CD Rom boot menu. Choose install, and when you proceed it should offer to install to the empty virtual drive you created. (It should be 'unformatted' or similar. Just make sure it's the same size as the one you specified. You don't want to somehow install onto your main drive containing Windows and all your documents and programs!)

You can accept all the defaults, and when it's finished you can eject the virtual CD via the menu and reboot.

Voila! Ubuntu Linux running inside a window on your desktop. There are plenty of help pages explaining how to use the shared folders (useful for transferring files) and so on.

Now you've got a Linux installation, what can you do with it? There are plenty of neat card games, and the software repository contains thousands of free programs. And how about safe web browsing? Any suspect site opened in Linux can't install a windows trojan or virus, can it?

Tags: linux, ubuntu, VM

Posted 18 October, 2011 . . .
View the news index.