Returning to Linux
It has been a long time since I’ve worked with linux. I had a couple years’ stint with linux back in my college years, roughly 2000 to 2005. After entering the workforce and becoming more interested in financial markets I switched to Windows and have been using it as my primary operating system since. When I recently became more interested in establishing some personal programming projects it didn’t take long to discover that I didn’t want to be working in windows. Nothing against .Net programmers who develop desktop applications, or VB programmers who write Excel macros. I think I might develop proficiencies in those technologies at some point as well, but for the moment it seems necessary to head back to linux where I can be sure to find many programming tools freely available.
Why Linux?
It starts with something as simple as the terminal window. In windows I didn’t think that the Putty application was going to cut it. In Putty it wasn’t immediately clear to me how to dynamically resize my terminal windows or even to launch multiple terminals. I like to be able to take a ‘crayon box’ approach to programming and open up several terminals in different background and foreground color combinations. I find this helps me to recall what each window is showing at a glance through the visual color association I established when I opened the terminal… but I digress. My point with this example is that I didn’t hold any shred of hope for finding this kind of tool on windows, whereas linux is quite likely to have something similar for me.
What I really want to emphasize here is: for those programmers out there who are thinking of going back to linux, the virtual machine approach is low risk and easy to use. I have had a virtually pain free experience getting my virtual installation up and running. As with any independent technology project, there was some googling, article reading, and troubleshooting involved, but isn’t that the fun of it?
Why virtual?
I’m on vacation at the moment, traveling to spend time with the family. On the course of this trip I spoke with my technologically adept cousin who advised me to get back to linux. I had been on the brink of this decision, but his comments tipped the scales. Once I became committed to the idea of running linux for the purpose of having a better programming environment, I began to consider my options for obtaining an installation. The most straightforward approach would be to simply buy another computer and install linux on it. This is certainly still possible, but I would like to avoid spending $300-600 for a basic system until I am really sure that I need it. On top of the up front costs, I would have to wait until returning from vacation to get started. Not the way I want to go when I get excited about a new project! On the other hand, the virtual option was available immediately and requires nothing more than time to understand how to use it and a host machine with sufficient hardware to support it, which I already had.
VirtualBox + Ubuntu = Linux on Windows XP
I googled for “linux on windows” or some other similar terms and eventually came to a tutorial that was clear and easy to understand. I have to give credit where credit is due. This article is what set me in motion. I read through it, and even into the comments. I am glad that I did because VirtualBox was mentioned there by the author. When I read up on VirtualBox I was really impressed. I might have used any software that was recommended, but I saw that this is an open source project backed by Oracle. Seeing the Oracle name behind it definitely gave it some weight. I’m also glad to see that they are developing code to be freely shared with the world at large.
Sharing files between Windows and Linux
VirtualBox supports ‘shared’ folders between the host and guest operating systems. In my case the host is Windows and the guest is Ubuntu. I have to admit that I got a little tripped up over the process of setting up the shared directory. In hindsight, I guess that it seems simple.
These virtual machines boot from ISO images, which are single files representing the data that would normally be found on a CD. In the settings for a particular virtual machine configured through VirtualBox, you can include multiple ‘CDs’ that should be available to the machine upon booting. For installation, you attach the Ubuntu ISO. When the system comes up, it boots from the ISO in the same way as if you had a real physical machine that was reading a CD. It follows this analogy to real life even down to asking you to re-install if you leave the ISO attached to the virtual machine when restarting after the OS is successfully installed.
So now after you have set up your virtual machine and installed Ubuntu, you can take it a step further by adding the “Guest Additions” that are provided by VirtualBox for enhanced integration with the host operating system. These guest additions provide a few extra bits of functionality, the most immediately useful being the shared folder between the host and guest operating system.
Installing the guest additions is just like installing the OS on the virtual machine. VirtualBox provides a guest additions ISO in its installating directory. You add this ISO to the machine and start it up. In Ubuntu you then get this CD image on your desktop. This does not occur when you attach the Ubuntu installation disk, and so when I saw it on the desktop I was a bit surprised. After a few foolish attempts at executing this installation, I found the easy way. Right-click and choose “Open with Autorun prompt” This executes the ISO as if it was a CD you just popped into the drive. I included a screenshot of this step with the output from a successful run in the terminal window behind it.

The second trick that VirtualBox has up its sleeve in this case is the permissioning of the shared folder. I was perplexed to see that the folder was owned by root and the vboxsf group. I tried su-ing to root by way of my user password, but of course that didn’t work. I had to google for “ubuntu root password” to find this page telling me that all I needed to do was type ‘sudo -i’ to gain access to super user. I’ve included another screenshot of my terminal session in which I figured this out. I’m sure that it will soon be a quaint reminder of simpler times, when I was much more innocent.

Once I had root access, the rest was smooth sailing. I should now be able to move files between my windows session, which I expect to be more responsive and Ubuntu quite easily. I even installed Cygwin for the occasion, and used it to create the WordPress.tar file shown above.
Responsive linux machine does not degrade windows experience
I am surprised and pleased to see that my little Dell Inspiron E1405 was up to the task of running a virtualized linux machine. It is just a 1.6 Ghz single core CPU with 2GB RAM, but it does the job. Here’s a little more detail from speccy.

Highly recommended
In summary I would highly recommend this approach to anyone thinking of getting back to linux. It was much simpler and pain free than I had anticipated. The hardware specifications required to do it are not prohibitive. In fact they are quite easy to satisfy with today’s entry level PCs. If you are interested in programming to nuture your own ingenuity and curiosity, why not take the plunge? It’s not as scary as you might think.