Monday, October 5, 2020

Why Linux is perfect for web developers

Linux runs the cloud, the Internet and super-computers. Learn why web developers love Linux too!
Photo by Ilya Pavlov on Unsplash

Following up on our previous discussion on why use Linux, and learned why Linux is ideal for development. Today, let's focus on why Linux is a fantastic system for web developers.

If you recall our previous post, we started alluding to this StackOverflow pool, where Linux was cited as the most loved technology by developers at 83%. There are multiple reasons for that. Let's learn about them next.

Linux is free

Obviously, one of the main reasons to run Linux is because Linux is free. As poverty (unfortunately) grows around the world, it's important to minimize costs for users and companies. Since prices for Windows lincenses are really high and utilizing MacOS, almost impeditive for most of us, being free allows Linux to reach a much wider audience including independent developers, small organizations taught and used in schools, universities and research labs at a really low cost.

Robust package management

While it's true that MacOS users can use brew to enhance their terminal experience, and even Microsoft is building Windows a package manager (despite 20years late 😌) they are nothing more than a poor adaptation of Linux's built-in package mangers. It's on Linux where the real experience shines since the package manager integrates into the update system which integrates into the shell. 

Quicker access to modern tools

You'll get quicker access to the latest releases of your favorite programming language on Linux too. Linux users frequently get earlier access to Golang, Rust, NodeJS - just to name some - without resorting to building them from scratch.

Streamlined workflow

Beyond getting access to the latest tools, developing on Linux will be a much more pleasant experience to to the nature of the system: an awesome and powerful shell (Bash on most cases) accessible via a powerful window manager (GNOME or KDE) being backed by a super solid system with an extensible list of packages available to install at your fingertips.

Awesome command line tooling

Developers love the command line. Using the command line is key to automate your tasks and to opmitze tasks, resulting in huge productivity gains. Today, even tasks that are commonly UI-based such as browsing the web, managing files and even watching YouTube. Web developers can gain signifiant productivity if they embrace this workflow which's the recommended way to building new web apps quickly with ReactJS, VueJS, Angular. Popular tools and frameworks such as WordPress and even proprietary tools such as SendGrid or HubSpot have their own CLIs.

Plus, tools such as tmux or i3, allow you to multitask without sacrificing your productivity.

On the left man git, on the right: vim on top and htop on bottom

Streamlined cloud and container integration

As Red Hat usually says, containers are Linux. Creating your web app today requires probably a lot of dependencies, some of which (a database server, for example) may not be trivial to install - or may use a lot of your resources. Containers are today the way to streamline that process as you can build complex applications with tools such as DockerDocker Compose and Minikube.

Dotfiles

Once you get comfortable with the shell, you'll probably want to customize it to your needs. Developers realize that they really make them productive. Since it's common days to work on multiple machines, an elegant solution to that problem is to host your dotfiles in a private or public repository like GitHub so you can quickly restore your favorite settings in any of your development machines.

Integrated Git

Git is an essential requirement today. On Linux git is an integral part of the workflow (of course, it was invented by Linux Torvalds, Linux creator to facilitate the complex integration workflow of the Linux kernel). Using git in Linux makes everything simpler as it integrates into your command line and shell.

A powerful shell

Bash (and siblings such as ZSH and Fish) is a really powerful tool in Linux. Developers who know it can leverage it to enhance their workflows. For example, you could map the following three commands:
  • git add .
  • git commit -m <your-message>
  • git push
As one operation, the following gcp command:
gcp(){
        msg="More updates"
        if [ -n "$1" ]
        then
                msg=$1
        fi
        git add . && git commit -m "$msg" && git push;
}
So that using it, would be:
gcp "Some commit message"

Oh, and simply typing gcp would do all the above using "More updates" as the git commit message. Use but don't abuse 😊.

Linux is reliable

Writing software requires a a reliable system. As you probably know, Windows (and even Macs) are not as reliable as their companies tell advertise. Your Linux system will rarely crash. You'll also realize that Linux tools will be more stable than their Windows or Mac equivalents.
Remember this?

Excellent Documentation

Developers have to frequently access the documentation. Linux comes the man tool allowing you access to the documentation you need available regardless of your exposure to to the internet. Just run man <cmd> to view documentation for the software you need:

Good for old hardware

Linux is also excellent for old hardware. For example, you can run lighter tools that utilize less resources. Most distributions (such as Fedora LXDE shown below) release alternative lightweight versions optimized for lower-end hardware.

Updated Software

Another reason why developers love Linux is because (1) they're exposed to the cutting edge software and (2) they'll get frequent updates/upgrades. Regarding the latter, updates on Linux are not only reliable but are more frequent than anything you'd get on those systems. The system will be updated multiple times a week and a new version can be available every 6 months depending on the distribution with long-term releases available every 2 years.

Outstanding software availability

Not only installing software on Linux is simple  Every Linux distribution provides a tool to manage software with lots (literally, thousands) of apps. Visual Studio Code, Slack? You'll find on Linux. You'll also find enterprise software like Zoom and Microsoft Teams if you need to talk to your clients.
Source: Slack Downloads

Networking tools

Web development is all about networking. Linux comes with powerful networking tools, some of which you probably heard of. Samba, nmap, whois, nslookup, ping, curl, ssh, among others are natively available. There's just so much here and once you learn these tools you probably wouldn't be able to work without them.

Cloud-native tools

Linux comes with lots of tools to use in cloud development. The most commons are Docker (and its sibbling podman) and Kubernetes but it also has easily installable access to tooling for Azure, AWS, GCP and devops/automation tooling such as Ansible, Helm, Vagrant and more.

Support from a huge community

Linux users are spread around communities over the internet. Being on Reddit or on forums of your specific distribution, developers frequently share their thoughts with similarly minded folks around the web. This helps them share knowledge, news, learn new things and obviously, help others.

Linux is highly customizeable

Another reason web developers can benefit from using Linux is due to its extensive customization. With the right instructions they can customize their system as they wish resulting in a quicker setup or, in case containers aren't sufficient, modelling their systems as per the customer's requirements.

 Some of the things you can tweak in Linux are:

  • Desktop Managers: don't like GNOME or KDE? There's XFCE, LXQT, LXDE, etc for you.
  • Login Managers: how you login to your system.
  • Desktop themes: configure themes, colors, etc.
  • Fonts: customize your fonts, sizes, etc.
  • Shell: shell is the application that runs on your terminal and also can be changed or customized.
  • Systems and Services: your system will have an endless list of services to choose from.
  • Kernel: even the kernel, the main process of your system can be customized. 

Enterprise-Grade Security

Linux comes with built-in enterprise security tooling. Beyond that, curated repositories Linux users are used to having repositories curated by the community and available for them. That means less viruses, no adware, unsafe or untrusted software running on your machine.

Conclusion

On this post we understood a little more why developers use and love Linux. You too could benefit from using it today! We hope you learned something new today and are excited to try out Linux and use it as your main system as we do!

See Also

Featured Article

Free Software, Open-Source, Libre, FOSS and FLOSS: what are the differences?

Are these just different names for the same thing? Or there are differences? Photo by Romain Vignes on Unsplash We have been discussing...

Popular this Week