10 Reasons Why Programmers Use Linux (Everything You Need To Know)

Many programmers eventually realize that they’ll need to use Linux for development. But what exactly makes Linux so popular?

1. It’s Free and Runs on Anything

Anyone can download and use Linux for free. Whether it’s Ubuntu, Mint or CentOS– you can quickly download a copy and try out of the many distributions without paying a single cent. Developers love free stuff.

Linux can run on just about any hardware. The Android OS is built on top of Linux and runs on millions of smartphone devices. Linux supports all standard PC hardware. And with some effort, you can even run Linux on a Mac machine.

Even though off-the-shelf PC computers often come with Windows pre-installed, a standalone copy of Windows requires you to buy a license. MacOS comes pre-installed on Mac machines and is only gauranteed to run on Mac hardware.

2. Simple Command-Line Tools

Typing a command is much faster than using the mouse to click and navigate through endless files and folders. The command line is king on Linux.

Linux command line programs are very simple. Here are the most common commands that programmers use on linux:

  • cp : copy a file
  • mv: move a file
  • rm: delete a file
  • touch: create an empty file
  • mkdir: create a new directory
  • cd: change directory
  • find: list all files in a directory

Every-day tasks can be easily performed through a few swift terminal commands. On a Unix-like OS like Mac, you can also run the same commands, which makes Mac a popular option for developers, too.

3. Using Scripts is Easy

Combining multiple commands together is a powerful way to create sophisticated bash scripts. Once a script is created, then you can save it and easily execute the script in order to automate a task.

For example, if you wanted to create script that makes a backup of a project directory, you could create a script like this:

zip -r bkp-$(date +%b-%d-%y).zip ./project

This script might look like gibberish at first, but it’s actually simple. It combines the zip command with the date command.

The script will create a zip file named bkp-May-24-21.zip which contains the project directory. You can run the command each day to generate project backups. The file name is generated automatically based on the current date.

You could add additional logic to upload the file to Google Drive or send the file to someone via email.

Scripts are an important part of everyday operations as a developer. Even if you don’t create your own scripts, there’s a good chance that you’ll use scripts written by someone else.

4. Super Secure File System

Another thing that Linux is known for is great security.

While Windows allows you to do just about anything as a normal user (and thus is susceptible to viruses), Linux is more stringent about file permissions.

For example, on Linux, certain files can only be modified by the “super user”, via the sudo command. It’s good practice for linux users to avoid using the sudo command so that they can take advantage of heightened security.

Linux allows you to set granular permissions to a file for reading, writing and execution. For example, if you want to make sure that a file cannot be modified or deleted, you can make it read-only. No more accidentally deleted files!

Linux viruses are practically unheard of. However, if you go about running 3rd-party scripts willy-nilly with the sudo command, then you’re practically inviting trouble.

5. No Bloatware

Linux doesn’t need to come with loads of bloatware software installed like Windows and Mac.

Linux Desktop

You can run Linux in a desktop environment, meaning that you use it as your every-day OS for checking email, watching videos, and writing documents. The same as you would on Windows or Mac.

As for the Linux desktop experience, you can install Ubuntu Linux, which typically includes an entire suite of applications, such as a media player, LibreOffice document/spreadsheet editor and more.

On the other hand, you can also install Linux Mint, which is a minimal-but-functional Linux distro which is just as user-friendly as Ubuntu.

Either way– install Google Chrome, and you’ve got yourself a fully functional free OS that handles most of your needs.

Linux Server

More often than not, you’ll use Linux to run a web server.

Some Linux server distros are packed with numerous command line programs (Ubuntu) while others have a lighter footprint (Alpine Linux).

Tiny Linux Distros

Using a lightweight Linux distro can help you squeeze the most performance out of your system and keep memory usage to a minimum. These distros are so tiny that they can be copied to a USB drive and actually boot from a USB drive, too.

Tiny Core Linux comes in at 16MB, which is ludicrously tiny in size for an entire operating system.

6. Stable as a Rock

Regardless of how intuitive, slim or fast Linux is, none of that would matter if Linux wasn’t stable.

Windows has a long history of giving users the dreaded Blue Screen of Death. MacOS isn’t perfect either, with occasional crashes and boot issues.

But Linux is known particular for its rock-solid stability. It’s incredibly rare for a Linux system to crash or become unresponsive. In the worst cases, the GUI layer might exhibit issues, but the core system will still run fine, allowing you a path towards restoring the system to a good state without rebooting.

7. Backbone of the Web

Due to the core security and stability of Linux, it has become the backbone of the web.

Linux is used by over 40% of known websites on the web. That might not seem like much of a a majority, but consider that Windows servers comprise of less than 25%, while all other server types make up the remaining share.

Some die-hard Linux users claim to have had their machines running since 2004 without a single reboot.

8. Totally Customizable

While Windows and Mac only allow you to customize the wallpaper and make minor adjustments to the interface, Linux provides tons more options.

GNOME, KDE and Unity are among the numerous GUIs that you can install on your Linux machine.

Some Linux GUIs (like Xfce) are optimized for performance and using minimal memory. Other GUIs (like PopOS) are geared towards providing a beautiful and smooth experience similar to Windows and Mac.

9. Open-Source Ecosystem

Aside from simply customizing the look of the OS, Linux is entirely open-source.

This means that you can download the source code, make whatever changes you want to it, and build your own version of Linux.

Although this fact tends to resonate mostly with hard-core programmer folk, many users love the open-source aspect of Linux on principle alone. It’s the idea that you have complete freedom from litigation and copyright issues that makes it enticing.

For example, Facebook was initially built from the LAMP stack (Linux, Apache, MySQL, PHP)– a bundle of open-source programs that allow web developers to build full web applications. Entrepreneurs love Linux not only because it’s free, but because it represents creative freedom.

10. Native Docker Support

Docker has become a household name for backend developers. Docker allows developers to package their entire application (and its dependencies) so that it runs the same on all systems.

Most of the internet runs on Linux servers. Docker runs natively on Linux.

Using Linux in Docker

During the development phase of a server application, you’d add some code to the server, run the server code locally for testing, then deploy the same code to production.

The caveat about programming is that it’s not just about running code. It’s also about the runtime environment. Where are you running the code?

Back in the day, it was common to run into the issue with common software. If we tried to run a Windows XP program on Windows 98– it wouldn’t work. The program was built for a newer OS.

Running the same program, on different systems, had different results.

Now what about teams of developers who need to collaborate to build an application? What if a developer is running Windows, another developer running Mac, and another one is using Ubuntu Linux?

If all of the developers use Docker, then it’s not a problem. They can all use the same runtime environment so the application will behave the same on all systems.

Everything in Docker

On on hand, you can run your own code in Docker. But it’s quite popular to run open-source programs in Docker, too. Here’s a list of the most common Docker images:

  • Ubuntu (operating system)
  • Node (code interpreter)
  • Python (code interpreter)
  • Postgres (database)
  • MySQL (database)
  • Mongo (database)

These are all pretty much the building blocks of the modern web. They can all run inside of Docker, and used together with Docker Compose.

Docker Workflow

Here’s how Docker is often used in modern backend development:

  • On your local machine
    • Write some code
    • Build an image from the code
    • Build a container from the image and run it
  • On your production machine
    • Pull (download) the same image
    • Build a container from the image and run it

The end result is that both your local machine and the production machine will run the same application from the same image (snapshot), so you won’t run into any surprises when deploying a new version of the application.

Final Thoughts

As you make more progress as a programmer, you will likely run into Linux at some point. Or you’ll use a Unix-like OS such as Mac, which closely resembles the Linux experience.

Linux might seem like a handful at first. But give it some time and you’ll become one of the many basement-dwelling Linux aficionados, too.

Leave a Reply

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