Linux Basics for Hackers, Part 12: The Linux Philosophy

Bug Bounty Cybersecurity Cyberwar Cyberwarrior Hacking InfoSec Linux Vulnerabilities

Welcome back my aspiring hackers!

Although this article may have been better placed first in this series, I doubt that anyone would have read it when just starting out studying Linux. Now, that you are well into your Linux studies and have some familiarity with how it operates, I’d like to take this moment to explain the philosophy around the Linux operating system.

When I use the term “philosophy,” I am not referring to such questions as “what is the meaning of life” or “does God exist,” but rather what was the underlying logic and reasoning behind the design of this ubiquitous and love-lived operating system.

As many of you already know, I am strong advocate for the Linux operating system. This is for a multitude of reasons that I have tried to explain in this article. Although Linux may be ideally suited to hacking and many other applications, I think it is important to understand the philosophy underlying the Linux/Unix structure and model for any environment.

In this article, I will use the term Unix/Linux to designate this operating system. Unix was the original, developed by Thompson and Ritchie, and Linux was a re-engineer of Unix by Linux Torvalds and team. Mac OS X, iOS, Android, Solaris, AIX, HP-UX, and IRIX are all forms of Unix/Linux.

In addition, Red Hat, Ubuntu, Mint, Fedora, Debian, Slackware, and SUSE are all distributions of Linux. A distribution of Linux is simply an operating system that uses the Linux kernel, but then adds in its own additional components. These components vary, but may include applications, utilities, modules, the GUI, and others.

This variability in the distributions is often confusing and frustrating to the novice, but it is actually part of the Linux beauty and strength. Unix/Linux are designed to be flexible and portable, allowing the end-user to work the way they are comfortable, rather than the way the software developer thinks you should work.

Unix was first developed in the early 1970s by Dennis Ritchie and Ken Thompson at AT&T Labs. The fact that it is still being used over 40 years later tells you something about the quality, durability, and efficiency of this operating system. These guys did something right! How many things in computing are still around from the early 1970s?

If anything, rather than this “ancient” operating system fading away, it is gaining ground nearly every day. Chrome, Android, iOS, Linux, and Mac OS X are all based on this 40-year-old operating system. If we look at the fastest growing market—mobile devices—it is dominated by Unix variants with iOS and Android compromising over 91% of the market. It appears that the mobile market in the near future will be nearly 100% Unix/Linux.

What about this modest operating system has made it this durable and long-lasting? Let’s take a look then at some of the tenants of this design philosophy that has made Linux so successful.

Assume the User Is Computer Literate

The developers of Unix (and thereby Linux) made a radical assumption: That the users are computer literate. We can’t say the same for many other operating systems. In many cases, the operating system developers assume we are ignorant, illiterate Neanderthals who need to be protected ourselves. Not so with Unix/Linux.

As one sage said, “Unix (Linux) was not designed to stop its users from doing stupid things as that would also keep them from doing clever things.”

Perfect! Could not have said it better myself!

Complete Control

One of key reasons that hackers use Linux and only Linux, is that it gives us complete control. Other operating systems try to hide some of their operations and features from us, afraid we will screw things up. Linux is totally transparent and enables us to see and use everything.

Choose Portability Over Efficiency

Unix was the first portable operating system, meaning it could be used on many different hardware platforms. This has served it well as Unix/Linux has now been ported and compiled for over near 60 hardware platforms. This has been a critical element in its longevity and ability to adopt to an ever-changing technological environment.

Store Data in Flat Text Files

Unix/Linux stores data in flat text files unlike other operating systems. This makes the data as portable, or more portable, than the code itself. Nearly all systems can import and use flat text files.

Use Shell Scripts to Increase Leverage & Portability

Shell scripts enhance the power of our applications. By writing a script, we can automate an application to do something as many times as we would like, as well as leverage the capabilities of other applications simultaneously. In addition, these scripts are then portable to other systems without having to recompile them.

Allow the User to Tailor Their Environment

Unix/Linux was designed to allow the user to tailor their environment to their liking. The user is in control and not the software developer. Unix/Linux implements mechanisms for doing things, but they don’t dictate how you do things. This tailoring can take many forms including the graphical user interface (GUI). There are numerous GUIs available for Linux including GNOME (the default on Kali and the most widely used), KDE, Unity (Ubuntu’s default), Sugar, Trinity, Xfce, Enlightenment, and many more. In most cases, despite the default GUI that might come with your system, you can install and use any one of the other interfaces, if you please.

Make the Kernel Small & Lightweight

Although many operating system kernels continue to add features to the main kernel to offer users greater capability, they make it more and more bloated. The Unix/Linux model is to keep the kernel small and lightweight, but allow the developers and users to add components and modules as they please.

User Lowercase & Keep It Short

lowercase names and commands are a unix/linux tradition.

Silence Is Golden

Unix/Linux commands tend to be silent when you have done things correctly. This can drive some new users a bit batty when they, for instance, copy a file from one location to another and Unix/Linux has nothing to say. Not a confirmation or even a pat on the back.

Think Hierarchically

The Unix/Linux operating system was the first to develop a file system organized into a hierarchical tree. This hierarchical thinking has extended into many other areas of the operating system, such as networking and object-oriented programming.

Summary

I hope this little foray into the philosophy of Linux helps you to understand why Linux is so different than those other operating systems. The result of this philosophy is an operating system that is small, lightweight, and flexible, which treats all users with respect.