Linux: How Tux Stole my Heart
Recently, I've been doing a lot of "work" on Linux-based machines, and for me there is no equal. As crazy as it sounds, a lot of Linux software out there just doesn't have an equivalent on Windows or Mac. This post is dedicated to those who proudly shed their blood making Linux what it is today. This is coming from a 19-year Windows user, converting to Linux only a few short months ago.
I am so glad that I did. Here are a few reasons why any developer should convert to using Linux:
GNU Screen
Screen will save you so much time and so much headache. Screen is a freaking awesome program, small and simple, yet so powerful, kind of like what Ant did for Java. The concept is this: run multiple terminals inside of one terminal and make it possible to detach from terminals. What does this mean? Fire up a terminal, start screen, run a time-consuming process like a backup, and close your terminal window. Yep, it'll keep running. Nope, no non-dev will be able to see that it's running, and it's not possible to "accidentally" terminals running under Screen. SSH to a server, start a few different processes (eg X-Server, VNC, Red5... whatever you want) and disconnect. The server (or your computer) will run these processes as long as your session is open. Don't worry, you can close the SSH session, we're talking about user sessions here. Today, I read that some guy configured his work computer to accept SSH connections, and what he'd do is this: on his long commute to work, he'd fire up his laptop, connect to the machine at work, start it doing some time-consuming tasks with Screen, then shut off his laptop, and when he got to work, everything would be done. Get some with Screen.
Linux is a LIVING Operating System
Some may find it hard to believe, but Linux was designed with ease in mind. Linux is constantly learning and growing. What if 95% of the software on your computer could update itself uniformly and cleanly? What if you could install common programs with one line of code in your terminal? Linux can. On Windows, installing Java and Ant are pretty time-consuming and take a lot of fooling around. When I first installed Java on my Vista laptop, I nearly ruined my OS. I was a n00b back then, and I accidentally wiped my PATH environment variable, which is kind of really important on Windows OS's. Lots of stuff broke, and it was a complete nightmare. Installing Java on Windows kind of looks like this:
1. Go to Sun's Java JDK download site.
2. Find and download the latest Java JDK.
3. Run the installer.
4. After it's done, set the JAVA_HOME environment variable to the root directory of where you installed Java, eg "C:\Program Files\Java\1.6.X\". (This is a chore in itself... environment variables are a major pain on windows)
5. After that, add "C:\Program Files\Java\1.6.X\bin" to your PATH environment variable.
Then, basically do the same thing for Apache Ant. Make sure it's all working by running "java -version" and "ant -version" in a command prompt.
What about Linux? Run this line in Ubuntu and guess what? you're done:
sudo apt-get install openjdk-6-jdk ant
Pretty significant difference if you ask me. Oh, and how about updates to software? When new software comes out, you are notified in one centralized place, you hit "install updates" and it runs. You get the newest version of your music player, Java, PHP, Python... whatever you have installed. You also get new updates to the Linux kernel, making your operating system more secure, fast, and stable by the day.
Linux is Terminal Based
It's an operating system built by developers! Almost everything that you can do visually in Linux, you can do in a terminal. This makes for really nice shortcuts. Pop open a terminal with a keyboard shortcut, start a lengthy filesystem operation in a Screen session, close the terminal (or detach the Screen session), and pop up another terminal and keep hacking.
Linux (Ubuntu and Fedora at least) Support Keyboard Shortcuts out of the box
It's super-nice to have keyboard shortcuts, let alone ones that run right out of the box. For me, I can open a terminal with Ctrl+Shift+T, I can start Firefox with Ctrl+Shift+F, I can get to my home folder with Ctrl+Shift+H... so nice.
Of course, this post could go on and on, but was largely inspired by my deep frustration over having to do with Windows today. Installing Cron on Windows was next to impossible, and installing a C/C++ compiler and Make on Windows was almost not worth it, especially when I can install Make on Ubuntu with one line in the terminal.
Oh, and did I mention that I'm posting this blog over an internet connection using my phone as a modem... from UBUNTU!? You heard it right. I'm connected to the internet with Ubuntu over my phone. Linux rocks. Until next time, here's hoping I can get over my Linux saga and write a post on Red5 next time...