Why You Should Use Linux to Learn Programming

Linux is popular with programmers, and for good reason. Linux and Unix has long been a mainstay of computer science education for a long time. If you’ve always wanted to learn programming, whether you want to develop software professionally or just for fun, there’s no better platform to cut your teeth on.

If you’re still not convinced, here are a few reasons why you should use Linux (or any other Unix, including the BSDs) to learn how to program.

Linux is best known for the fact that all the distributions and most of the software is available free of charge. While Microsoft and Apple development tools can cost upwards of hundreds of dollars, Linux, since its user base is comprised of a lot of developers, has lots of programming tools available for free. Some distros have them pre-installed, some make them available through their package repositories. Browsing the available tools will make you feel, as Homer Simpson put it, like a kid in some kind of store. There are editors, compilers and interpreters for nearly every language ever created, debuggers, parser generators, you name it. If these programs actually cost money, you’d probably be able to buy a small house for the money you paid for them.

In addition, as Richard Stallman famously put it, these programs are also “free as in speech, not as in beer.” Stallman is best known for founding the free software movement back in the ’80s, which was an attempt to make sure that users could always get access to software that had the source code available. Whether you call it “free software” or “open source,” reading the source code to programs is the best way to learn programming. Imagine if you wanted to become a great writer but weren’t allowed to read any books. How could you be expected to produce anything worthwhile without knowing about the history of literature.

linux-programming

While Microsoft changes its tools frequently, it’s an apparent attempt to simply charge their customers for their products by forcing them to upgrade.

Linux, on the other hand, builds on the Unix tradition by offering tried-and-true tools. You can pick up a book on Unix from the ’80s and much of it will still be applicable to a modern Linux distribution today. Although the GNU project and others have rewritten and enhanced many of the classic Unix tools, they still work pretty much the same as they did back in the ’70s and ’80s.

One reason Unix and Linux has been popular with programmers all these years is that it’s incredibly easy to build complex programs without a whole lot of effort.

The most notable feature of Unix is the way shells handle input and output. It’s easy to send the output from one program to the other. A trivial example would be to send the output of the “who” command that shows everyone logged into a system into the less pager:

If you tried to code up something similar in C from scratch, you’d be looking at at least a thousand lines of code. The use of pipes, on the other hand, turns Unix and Linux into software LEGO, which lets you build complex programs out of a simple set of building blocks. This is also the reason serious Linux users prefer the command line. It’s almost impossible to pipe input from graphical programs.

If you’re thinking of getting started, why not pick a Linux distribution and start exploring today?

Photo Credit: Striatic

6 comments

  1. “If you’re thinking of getting started, why not pick a Linux distribution and start exploring today?”

    Well, there are over 100 linux distros… which do you recommend to your readers to start programming? I know most of them are similar, but doesn’t hurt to ask? :)

    • Ubuntu – widest user-base, great community support + askubuntu Q and A site!
      I installed Ubuntu a few years ago when I a PC of a friend failed and she asked me to repair it. I was looking for a way to boot the PC and access the harddisk. Up to that moment I had used only command line tools and booting with USB to fully working OS with graph desktop blew my mind!
      I have some older machines and installed Ubuntu on some of them – the machines worked better than with windows xp.
      I got hooked. Sooner or later one gets to do some work in terminal, and though scary at the beginning, I got used to it. With time, I realized that this is really powerful tool, which is a beautiful door to the way for programming. I have automated almost any task on my desktop – for example I can copy any given folder to a specified location (sync to pics, to music, etc)

      • Yeah……. Ubuntu & others……i.e. Linux Distros are great. I repaired more than hundreds of PCs & saved more than million $ data just using this. but this would NEVER be posiible with win or Mac.

  2. To be honest, I don’t think that any particular distro is going to offer more than another for a budding programmer. I’m running Mint 13 64-bit, have installed Qt-Creator/Designer/etc suite, and am also looking at gtk. I feel the Linux community can ve supported in tangible means by supporting products developed for Linux through donations, or by buying an endproduct like PureBasic, which allows you to leverage your VB6 skills to develop apps for Linux, Mac and Windows.
    Linux is about open-source – which I heartily support and am in process of creating – but also about giving people an evironment to make a living. Which I why I support proprietary software for Linux as well as FOSS.

  3. I Love the Ubuntu. Coz its the neat & clean one; I can make it as I like & others like mint etc. are derivatives of Ubuntu…..so why not use the Core & basic one???

  4. Another thing I wanna mention here that , I have had been FREAK of programing from a very young age, but unfortunately I took the Business as my stream, here scope is about 0% to do so. But I been blessed by ubuntu, :D
    to do the regular works I prefer the command Line [as one said…..command line is THE BLESSINGS that the GNU/Linux users have] to do them & gradually I been again able to gather my courage & now I doing programming, wish soon I can be a security professional. In Shaa Allah.

Comments are closed.

Sponsored Stories