Set up a Linux/Django environment – on Windows
Last weekend I decided to go out on a limb and move to Ubuntu, replacing my Vista operating system. The reasons for this decisive move were many and varied:
- I use Linux exclusively when I program at work so it could sometimes be jarring to come home, starting programming for myself only to find that some things don’t work on Windows or at least, they don’t work quite as well
- Every server I have anything to do with is Linux so a Linux development environment at home would help when making sites live (I’m looking at you file-name capitalisation)
- Django is easier to get up and running on Linux and aptitude on Ubuntu makes installing python extensions a breeze
- I could easily go on…
So, armed with my freshly burned ISO of Intrepix Ibex (Ubuntu 8.10), I backed up all my data and began to install Linux.
The details of what happened next could very well form the contents a whole new blog post so I will spare you the details and say only that NVidia Stripe RAID 0 array + 2 x NVidia GForce graphics cards in SLI + 2 x 64bit AMD chips = bye bye Ubuntu GUI. After fetching my shirukens and acting the ninja for a time, I was able to get my system to boot again but with a system so unstable, it was clear I couldn’t use Ubuntu as my primary operating system.
But I Still Want Linux!
One thing I can say about myself is that when I get the idea that I want something, there isn’t much stopping me from getting it. So having made the decision to set myself up with an Ubuntu development environment, it was going to take more than Ubuntu not working on my computer to change my mind.
The whole time that I was reinstalling Vista and getting my computer back to a working state I was thinking of ways to get what I wanted. What I will run through now is how I have managed to get all the benefits of developing on Linux but doing it all from windows.
Virtually Impossible
Some things you’re going to need if you want to follow along with what I’ve done.
- About 20 Gigabytes of free hard drive space
- Memory, the more RAM the better but if you’ve got 2 Gig you should be okay. My computer has 4 Gig plus 1 Gig of dedicated graphics RAM
- An ISO of Ubuntu — you can use one that’s on a CD/DVD if you like but the process will be faster with the ISO on your local hard drive
- A copy of VirtualBox from Sun MicroSystems. This is an open source software virtualisation program that allows you to run full operating systems within you current OS
As I began this process immediately after installing Vista, my hard drive was not fragmented but for best performance, de-fragmenting your hard disk is recommended. The Virtual Machine may take up quite a lot of space and a fragmented drive could mean your “virtual hard-drive” is in all different places on your computer which will mean things goes slower than they have to.
Onwards ’til midnight
The next three pages details the steps that followed to get my Linux development environment working on Windows.
Page 2 will explain how to install VirtualBox and get Ubuntu running as a virtual operating system
Skip To
Tags: Django, linux, virtual machines, virtualbox

March 10th, 2009 at 11:15 am
Fantastic post, Luke
I may use this method on my laptop when I get around to getting it fixed.
Also, you may not post very regularly (neither do I), but when you do post… you REALLY post!!
March 10th, 2009 at 2:23 pm
Ha ha! Thanks and tell me about it. I always try to write nice succinct posts but they turn into monsters. Even by my standards, this 4 page Goliath is impressive
July 17th, 2009 at 10:45 am
I was just doing something similar but using Ubuntu Server, and when I tried the step about installing the guest additions, I received errors telling me to install the Build and Header files and a compiler.
So you need to run the following commands first:
sudo apt-get install dkms gcc
sudo apt-get install linux-headers-$(uname -r)
Then the VBoxLinuxAdditions script should run fine
March 7th, 2010 at 6:35 am
Thanks for this post. I am new at python and this is a big help.