You know, when you pick up a technical manual, you usually expect the dedication page to be standard boilerplate, like to my spouse or to my kids. It's sweet, but it's completely predictable.
It's the one page of the text you generally just flip right past to get to the actual architecture diagrams right exactly.
But today we are doing a deep dive into Ahmed al Khaberi's work. Learn Linux Quickly, and his dedication genuinely made me laugh out loud. He thanks his mom naturally, but then he drops this note to his dad. He says, I know you wanted me to go to medical school to be a doctor, just like you. Sorry, pops, computer science is the future.
I mean, it is a very confident opening m but historically speaking, he really wasn't wrong to make that bet.
He was completely right. And that is our mission for you today to decode the architecture of the world's most powerful, yet largely invisible operating system, Linux, because if your perception of Linux is still stuck on that old trope of a lone hacker in a dark room compiling source code, you're missing the macro scale of what this system actually is.
Oh, absolutely. The scale is staggering when you actually look at the numbers.
Right, we are talking about the engine powering over ninety percent of the world's supercomputers, seventy five percent of all cloud solutions, your Android phone, government servers, Lexus and Toyota smart cars, and I mean even some washing machines.
Yeah, you are interacting with a Linux kernel dozens of times a day, even if a command line interface never once flashes across your screen.
It's wild. Okay, let's unpack this before we start parsing command syntax and all that. We need to understand where it came from, because we need to know how it differs from the systems we're used to, like Windows or macOS.
Well, the contrast with proprietary systems is stark, unlike Windlows or mac which were engineered by massively funded corporate teams under strict NDAs. Linux originated in nineteen ninety one as a mere hobby project. Wait, a hobby project, yeah, by Linus Torvoldz who just a computer science student in Fenmlas and at the time he built his own Unix like operating system and crucially it became the ultimate open source.
Project, meaning the source code, like the actual underlying logic of the software is entirely public. Anyone can edit it. But let me push back on this for a second.
Sure, go ahead. Wait.
If it's free and literally anyone on the internet can edit it, how is it secure and stable enough to run massive corporate infrastructure for like Amazon or Google?
That is a totally fair question. The open source model relies on the idea of thousands of developers constantly reviewing and patching the code. But to really understand how it maintains stability for an Amazon server farm, we have to break down the anatomy of the system. We have to separate the concept of the operating system from the kernel.
Right, let's draw that line. Because people use those terms interchangeably, don't they all the time?
But they are very different. The operating system is the complete package. It includes the graphical user interface, text editors, all the bundled apps. It manages the hardware and software overall, but the kernel. What's fascinating here is that the kernel is strictly the core.
The absolute center of it all exactly.
It's the part that organizes access to the CPU memory and disc doesn't care about your web browser. It just dictates resource allocation.
Let me try to map this out with an analogy to see his tracks. So the operating system is a full restaurant. You have the tables, the menus, the waiters, the whole dining room. That's the environment we interact with.
I like where this is.
Going, But the kernel is the busy kitchen expediter. They aren't talking to the customers at all. They actually decide which chef gets which ingredients, which pan goes on which burner, and exactly when a dish gets plaited.
That analogy holds up perfectly. And because this expeditor the Linux kernel is open source, developers quickly realized they didn't have to build just one type of restaurant around.
It, right, They could build thousands of different types of dining rooms, all using that same amazing expeditor in the kitchen exactly.
And that brings us to the concept of distributions or distros. Since the kernel is free, people package it with different apps and interfaces to create unique variations. Android is actually a Linux distro.
Oh wow, I didn't even realize Android counted as a distro, And Alcaberi mentions one called scientific Linux.
Right, yes, scientists use Scientific Linux specifically because it comes pre packed with specialized scientific apps and research tools.
There are distros for everything, so if you're listening to this and want to try it out, replacing your Windows OS with a Linux distro sounds honestly terrifying for a beginner, but the book has a safe way to play around.
Right, very safe. The book strongly suggests using a virtual machine or a VM. You definitely don't need to wipe your hard drive.
Which is a relief. A VM is basically like the movie Inception for computers. It's a dream within a dream.
Ah, that's exactly what it is.
It's a computer running inside your host computer. It shares your physical resources, but acts as a completely standale, isolated machine.
Right, so if you completely break the Linux system while learning, you just delete the VM and start over. Your actual computer is totally fine.
The technical specifics in the book are great for this. You use a program called virtual box, grabbing a Buntu ISO image and set it up. Alceberry suggests giving it at least two gigabytes or ideally four gigabytes of RAM and a dynamically allocated hard disc of at least ten gigabytes.
Four gigs of Ram is really the sweet bot if you want the graphical interface of a Buntu to run smoothly without lagging your host machine.
And there's this fun pop culture easter egg in the book. When you create your username during setup, the author suggests using Elliott.
A nod to the TV show Mister Robot.
Yep, the hacker main character. It's a great touch. So you've booted up your Ubuntu virtual machine. You see a familiar graphical user interface or GUI. You have apps like Libra, Office and Dash. But to be a true power user, you have to leave the mouse behind.
You really do. The guy is nice, but the real of Linux is in the command line.
And this brings up a major point of confusion for beginners, the difference between the terminal and the shell.
Oh, people mix these up constantly.
Let's go back to the drive through for an analogy. The terminal is just the drive through speaker box. It's the physical or emulated window where you speak your order.
Right. The terminal just displays the text. It doesn't actually understand what you're typing exactly.
But the shell is the line cook wearing the headset inside the shell is interpreting your order and actually making the food or you know, executing the commands.
This raises an important question, though, what happens when you type absolute gibberish into the terminal like you just mash your keyboard and hit enter.
It doesn't crash, No, not at all.
The shell simply replies command not found. It's a literal interpreter. If it doesn't recognize the exact order, it just hands it back to you.
Here's where it gets really interesting to me. I love how literal Linux commands are. You don't need to memorize arcane magic spells. The commands are exactly what they do.
The Unix philosophy is to do one thing and do it well, so the commands are very straightforward.
Let's run through some examples. You type date and it prints the system date and time simple enough. You type Michael Fagele it prints the calendar, and I love this. You can time travel. You can type I'll call twenty twenty two to see that year, or even autocoll FEP nineteen ninety three.
Surprisingly fun, just to see what day of the week you were born on. Yeah.
Then there's clear, which just wipes the screen when it gets too messy, an echo, which literally repeats back whatever you type. So if you type echo, cats are better than dogs, it just prints cats are better than dogs.
Right back, which seems silly at first, but echo is actually vital later on for writing automated scripts makes sense.
And my absolute favorite history. It shows a number list of everything you've typed. If you want to run the seventh command you typed again, you don't retype it. You just type an exclamation point in the seventh like point seven.
It saves so much time. But commands rarely just run in their basic state. They have options or flags to change the behavior.
Right. Let's talk about hyphens, because this confused me at first.
Sure, a single hyphen is for abbreviations like a single letter, so H. A double hyphen is for full words so human.
So if I want to check my available memory, I type free, but it gives me the answer in raw kilobytes, which is practically unreadable for a normal person.
Right, It's just a massive string of numbers.
So you add the option. You can type free H or free human, and they do the exact same thing. They display the memory in megabytes or gigabytes, a format humans can actually read exactly.
Options just modify the command's default behavior. Now, we know how to ask the computer for the date or its memory, but how do we ask it how hard it's working right now?
Taking the system's pulse, that is where the uptime command comes in. You type it and it shows how long the system has been running, who is logged in, and something kind of intimidating called load average.
Load average is a great metric, but it confuses a lot of people. It outputs three decimal numbers.
Yeah, what exactly do those three numbers mean?
They represent the system load basically the amount of work the CPU is doing over the past one minute, five minutes, and fifteen minutes.
So if my system is doing absolutely nothing, what does it say?
A load average of zero point zero means the system is completely idle. No processes are waiting in line for the CPU.
Okay, so why does it give me three different timeframes, one, five, and fifteen.
Because spotting trends is critical. Let's say your numbers are two point zero zero four point zero zero zero zero. The one minute load is a two, but the fifteen minute load is a six. That means the system load is much lower now than it was fifteen minutes ago.
Ah, so the system is cooling down exactly.
But if the numbers are reversed like five point zero zero, three point zero two point zero zero, your one minute load is way higher. That means the system load is actively spiking right now.
That's incredibly useful for diagnosing a slow server. And Alcaberi also notes you can use the lcpu command to quickly list your CPU architecture and DFAIH to check available disk space right.
Df stands for disc free, and throwing that H on there makes it human readable again.
So now we know how the system is feeling and how hard it's working, but we need to know how to move around inside its brain. Where are all these files actually.
Kept the filesystem? This is where Linux is very different from Windows, which uses C drives and D drives.
Yeah. Algebra explains that the Linux filesystem is like an upside down tree. It starts at the very top with the root directory, which is represented simply by a single forward slash.
Just everything branches out from that single forward slash, and.
To move around you use CD, which stands for change directory. So CD takes you to the very top, but if you get lost, use PWD.
Right working directory.
Yes, I love PWD, it's the ultimate you are here a red star on a mall map. If you're lost, you just have PbD and it tells you exactly what folder you're standing in.
It's essential, and once you know where you are, you use LS to list the files, or ll ls l e L for a long list that shows all the file permissions.
The directory structure is so organized too. It's not just a free for all.
Oh, it is trickly segregated by design. For example, you're the home directory, which is where regular users live, your documents, your downloads, but.
The administrator, the root user, doesn't live there.
No, the root user has their own exclusive home called Root. It's completely separate from regular users to prevent accidental damage.
And then there's Bin and SPIN. Bin holds your essential everyday programs, your standard binaries, but SPIN holds the system administration programs.
Right, the tools that require special privileges to run. It keeps the heavy machinery locked away from the standard tools.
But there is one directory that comes with a massive warning label, the tempep directory.
Ah, yes, the temporary folder.
This holds temporary files obviously, but the book explicitly warns you never ever store important files here. Why is that?
Because of how it's mounted. In many systems, TEMP exists in the system's volatile memory. Yeah, meaning the moment this system reboots or loses power, that entire wi your folder is wiped out completely, just poof gone exactly. It's designed for apps to drop temporary session data and clean it up automatically. If you save your novel on there and restart your computer, it is gone forever.
That is a brutal lesson to learn the hard way. So let's zoom out think about how far we've come today on this deep dive.
Let's a lot of ground to cover.
We started with understanding Linus Torvald's little nineteen ninety one hobby project. We talked about spinning up in a Buntu virtual machine, literally talking directly to the shell with commands like echo and corticle. We learned how to check the CPU's load average to spot performance bikes, and navigated the upside down tree of the root file system.
Once you understand the logic, it's actually incredibly elegant.
So what does this all mean? Why go through the effort of learning to talk to a machine like this?
Well, I think it leaves you with something really fascinating to ponder think about this. The very same free, open source code written by a college student as a fun hobby in nineteen ninety one is currently washing your clothes. It's managing global banking clouds. It is literally running the International Space Station right now.
That is insane to think about.
It really makes you wonder what other small, collaborative, weird little hobbies happening on the Internet right now might quietly become the invisible infrastructure of our future.
A hobby today, the invisible engine of the world tomorrow. Thanks for taking this deep dive with us, and we'll see you on the next one.
