This Is Really My Website Dot Com

Main Page Related Sites RSS Feed


Why I Use Linux

7/27/2019

A question was recently asked on Reddit Why do you personally like Linux (for coding)? I thought I'd post my answer here.

As a quick disclaimer, a lot of people, Linux devs included, do not like the way that I code. I don't mean that in a "they don't want to work with me" way, but just in a "they don't want to use the tools that I do" way.

The number one thing I like about coding in Linux is the command line. I use GNU Screen (some people prefer TMux) and write my actual code in Vim (there are a lot of alternatives for the many people that don't like Vim). The same GNU Screen session also has a connection to the MySQL database and gives me access to all kinds of CLI tools (some of which I write myself).

I also use SSH a whole lot. (SSH, in case you don't know, is when I log in to a machine remotely, so it's kind of like a remote desktop, but just for the CLI.) Anytime I'm writing something for a web server, I create a virtual machine and SSH into it, and write my code directly on the virtual server, so I don't have a "localhost". Virtually all of this is done via command line. The web server is run on my desktop machine in my office, but I do this remotely from my laptop in my living room. (I could do it from my phone if I wanted to, and on a few occasions that I needed to do an emergency change, I connected a bluetooth keyboard to my phone and SSHed into my company's server while at my parents' house, all from my phone.)

In my day job, I actually don't have a copy of the code on my local machine. I just SSH into my company's dev server and write code there.

Being proficient in the command line, I think, is a very valuable skill. Of course, I'm not saying that "If you don't use it, you're a bad dev," because that would be dumb, but just that it's a very powerful tool.

One thing that a lot of Linux devs can almost certainly agree on, even if they're not interested in everything I said before, is automation. PowerShell's not bad at all as a scripting language (I used it a lot in a previous job), but it doesn't have the resources that BASH on Linux does, most notably the repositories. (At least, to my knowledge, PowerShell doesn't have anything like Apt, Yum, or Homebrew, but I could be wrong about that.) I have a script to do everything needed to set up an Apache server pretty quickly (which is very useful for those virtual machines I mentioned).

Most of what I said above can just as easily be done with a Windows client as long as I'm connecting to a Linux server (and I have a Windows 10 machine with Ubuntu WSL installed, and it works fine as a client). I, personally, don't like the Windows UI/UX, and the aggressive updates drive me up the wall. Plus, as I already mentioned with automation, even with a Linux desktop, I can run a script to install and configure everything I want on a brand-new machine or just a fresh install of Linux instead of spending hours installing different programs like I would have to for Windows.

Something else that really appeals to me with Linux (or at least most distros) is the lack of copy protection and license issues. I can install a Linux distro on as many machines as I like, format the drive and reinstall (sometimes called "nuke and pave"), and I never have to worry about buying multiple licenses or anything like that.

And Linux generally doesn't take up as much resources as Windows does, which is very nice for old or low-end hardware. I have a laptop that came with Windows 10 pre-installed and it was unusable. I installed Ubuntu on it, and it runs perfectly.

As for the distros that I use, almost exclusively variants of Ubuntu. I already mentioned that I use Ubuntu for WSL, and my desktop machines are Ubuntu with MATE installed on top (if you don't know what MATE is, don't worry about it for the moment, haha), and my servers are all Ubuntu servers. I can't really say that Ubuntu is the best, though-- It's just what I'm familiar with. I've thought of trying Arch for my desktop, but haven't gotten around to trying it.

P.S.-- Your English was definitely clear. :D