Tuesday 6 September 2011

How to work with Linux

The beautiful thing about Linux is that there are a hundred ways to do everything. The horrible thing about Linux is that there are a hundred ways to do anything!

I have spent the last 5 or 6 years messing around (or "working" as I have to call it in order to get paid) with Linux in various forms - mainly Ubuntu, but quite a bit of its daddy Debian, a bit of Suse and a smidgen of CentOS.

Anyway, I have come to my own conclusions as to how to work with Ubuntu that give you the power to be able to fine tune things how you like, to mix "official" code with downloaded source and to mix both local and server-side resources without having to compromise easy updates and portability between machines. The way I have sorted things out also works on machines where you are not an administrator and just have a user account.

Anyway, over the next few posts, I am going to share this way of working with you, the internet. Now, I'm sure some of you reading this (if indeed anyone reads this) will just think "Oh that's obvious, why bother writing that down?". Well, many things are obvious with hindsight. I can tell you that I tried out a lot of other "obvious" ways to get stuff working and they all ended up causing me unnecessary aggravation down the line. Also, some of these tips are quite closely related to the IT setup we have here at the University of Surrey.

Anyway, without further ado, here is a summary of how to work in Linux

  1. Alter the base system as little as possible and document all changes you make
  2. Use environment variables set in .profile to apply system tweaks
  3. Use bin lib and include directories in your home directory to manage your own files
  4. Use a src directory to manage your source files
  5. Use share in your home directory to manage things you install but don't build from source
  6. Keep your transient data separate from your "real" data
  7. Use an automatic file syncing service such as Dropbox
I may have to revisit this post to add back in any things I have forgotten...

Anyway, I will go over all of those points in more detail in subsequent posts, and having laid down the groundwork I will then do some over-arching posts explaining how I manage things like python, building my own code, etc.

No comments:

Post a Comment