Monday, April 6, 2015

A developer switches from Windows to LAMP Part 1 : Project Dagobah

One of the objectives that I have set for myself over the course of the next couple of months is to familiarize myself with *NIX environment and become proficient enough to make the switch to the LAMP stack. In the process, I am going to write down some of things which I learn.This is meant for my own reference and does not serve as a tutorial of any sort, though if you find the info here useful, well and good! Of course, I am calling this Project Dagobah, because as Master Yoda put it in his years of exile on The Dagobah System

"You must unlearn what you have learned"

The way I have decided to approach this task is to develop some simple app completely on the LAMP stack. I am not sure which is the app that I will end up building, even though I have a few ideas in mind. However, I have started by installing Ubuntu on my machine.My previous attempts at this involved using a Virtual Machine on top of Windows. That somehow never led to the progress I wished so I thought of being completely radical.

Installing Ubuntu was very easy, though I did view a couple of tutorials on Youtube before I started. I freed up about 40 GB of space on my SSD before I started installation. After installation, I went to Windows and checked how has the disk been used by the Linux setup. I found that Ubuntu seems to have created 2 partitions, a small one where some system level stuff has been put and another where other stuff goes. I wanted to see this on Ubuntu. For this I used the df command.

To capture the above screen shot, I used shutter. When I first tried to install shutter, the package could not be found, so I updated packages using the command

sudo apt-get update

It took a while for this operation to finish and it seemed to me that this should be done once on a new Ubuntu installation.

I had also googled for some Linux tutorials to familiarize myself with some basic bash commands and decided on the one here. I used wget to download the tutorial in my Downloads folder. In my Windows, the Downloads folder is at C:\Users\Shashi\Downloads and after downloading a zip file I usually copy it to D:\ and then unzip it. Since I just have one partition here, I just created another directory /home/works which I thought I will use as the equivalent of D:\.

However, I quickly realized the stupidity of this assumption.

By running the df command with the given path I see that /home/works is on the same partition. D:\ on Windows is a different partition. The one lesson that we learnt while playing with our systems back in our college was to keep the data on a different partition. If one has to reinstall the OS, and that used to be quite frequent back in those days, you do not end up erasing your data. Thus I realized that /home/works needs to be on a different partition. So I decided to partition the current drive into two. I would have ideally done this when installing but the screen where one gets to select the partitions did not show up. I spent some time trying to learn how to partition but I cannot find the tool for that on Ubuntu, Gparted.

So for now, /home/works will have to stay on this partition. I am not too worried about it at the moment as I have played a bit on Aws ubuntu instances with multiple partitions.

I then went through the tutorial that I had downloaded. I opened the tutorial html files from the terminal using


which opens a file in the default program associated with it.

I also came across this Youtube channel which I found has interesting video tutorials for people just getting started with Ubuntu.

Well, that was a start. Next, I have to decide on what app I am going to build and what tools to install to start programming. 

No comments:

Post a Comment