Steve Taylor photo

Moving to Linux

I recently moved to Linux on my desktop, after many years of being Windows-by-default. I was never fervently for or against Windows, but eventually the advantages for web development of working on the same OS as my servers, not to mention a much more potent OS in terms of local development, were too great to ignore. In this post I want to share a few practical tips, which will hopefully be of use to someone else making the transition.

Dual-booting

I’ve kept my old Windows installation. I occasionally need it for watching DVDs or Blu-Rays that Linux can’t manage. Apart from that, I’ve barely returned to Windows. I won’t go into the ins and outs of getting dual-booting going – like most things here, there’s plenty of tutorials out there, and I didn’t encounter any real gotchas. I will say that the Linux GRUB boot loader is far superior to the one Windows supplies, so if given the option, choose GRUB.

Image editing software

The other potential reason for keeping Windows is Linux’s lack of Photoshop. GIMP tries hard to fill the hole, but generally fails. I actually ended up swapping my Windows laptop for a MacBook, though, so that’s the machine I use when I need to do a stretch of work with PSDs.

That said, bitmap graphics are less and less part of my development workflow. SVGs managed through an icon font generator (and probably soon, SVG sprites) handle most layout imagery. So unless you’re a designer as well as a developer, the lack of Adobe tools virtually ceases to be an issue. The design to dev deliverables turn from PSDs into individual SVG files (and JPGs of page designs for reference) – and software like Inkscape and SVG Cleaner should handle the bits of work you might need to do on those files.

Which distribution?

I didn’t go into this much. I knew it would probably be something like Ubuntu. A friend recommended Mint, and that’s been great for me so far.

Fonts

Font rendering can be disappointing at first. There’s various tips out there to improve matters.

LAMP

Obviously we’ve got the ‘L’ going already! You could try the XAMP approach, but I ended up preferring the ‘lighter’ approach of installing using Tasksel. Here’s a great tutorial:

Sendmail

I had most problems getting sendmail working, to send emails via PHP from localhost. Basic installation is fine, but things didn’t work straight away. After a lot of digging, the tip in this comment seemed to get things moving. I think this is just an extra hoop to jump through to be able to send things from a local dev machine that isn’t acting as a host on the web. Hopefully it gets things moving for you too.

There’s various recommendations for simpler alternatives to sendmail out there – I tried a couple but had no luck, and only got going with the above tip. YMMV.

The command line

Worth spending a bit of time on the basics if you’re still a bit lost when it comes to the command line. There’s some good tutorials at LinuxCommand.org, and Computer Hope has good, clear examples of syntax for various operations.

Bash profile

When you start a terminal session, the script at ~/.bashrc (i.e. in your home directory; the file is .bash_profile on Mac) is first run automatically. This is where you can set up some useful aliases to make working in the command line easier and quicker. Here’s my sample .bashrc:

Cloud storage / file synching

Automated synching of important files across machines is hugely important to my workflow, sometimes in the office, sometimes at home. I don’t use Windows much now, but setting out to dual-boot, as well as having a MacBook, I needed to find a good cross-platform alternative to SugarSync (which I’d been using on Windows, but which has no Linux client).

Dropbox is the market leader, definitely an option. However, I ended up settling on Copy.com. The company offering this, Barracuda, seem to be focussed on the corporate market, but there is a free personal plan with 15 GB space – and they have Windows, Linux and Mac clients. Plus, if you share files or folders with other users, their size doesn’t count against their limits, and vice versa, as per Dropbox – so it could be a good solution for a small team.

When I moved, a client for Linux on Google Drive was still a rumour combined with a slightly ropey unofficial implementation. That might be changing soon – so Google Drive could be an option too.

PhpStorm

This is my preferred IDE. As it’s Java-based, you know it’s cross-platform. This tutorial is helpful for installing:

However, apparently it’s because of Java that the fonts are a bit crummy. Fortunately, there’s an easy fix.

3 comments

  1. Dan Farrow avatar Dan Farrow

    I was really chuffed to read this because I embarked on a similar transition a couple of years ago.

    I can’t say changing operating system has been a breeze but learning to love the command line has been an empowering process!

    Have you had a look at Vagrant as a development environment, specifically in conjunction with VVV? Virtualisation may be one layer of abstraction too far but VVV makes it pretty easy to set up. I’ve found it a useful tool for managing local versions of multiple client sites.

  2. Steve Taylor avatar Steve Taylor

    Yeah, Grunt and node were big factors for me too! And looking into SVG sprite build tools – I didn’t master that when I looked into it, because I hit a brick wall with Windows support. Haven’t had time to go back to it since, but nice to know the tools will be there when I do.

    I did just look at Vagrant (though not VVV). Decided to leave it for another time. I use Oracle VirtualBox for IE testing anyway, and I’m sure it would have benefits. But right now I’m picking my battles. Feels like I’m *just* getting used to so many new things, and it’s nice. I think Vagrant is on my list for the next time I feel like upsetting my workflow in order to improve it :-)

  3. Dan Farrow avatar Dan Farrow

    Well yes there’s only so much workflow disruption one can cope with :)

    Thanks for some useful stuff in your post – I like the WordPress quick config bash script

Leave a comment

Your email address will not be published. Required fields are marked *