Linux for DevOps Mastery
Linux Basics
The Heart of Modern Tech
Much of the modern internet, from tiny web servers to massive cloud platforms, runs on an operating system that started as a hobby project. That operating system is Linux. For anyone in technology, especially in roles like DevOps, understanding Linux isn't just helpful—it's essential.
If you're in DevOps/SRE, Linux isn't optional — it's the default.
In 1991, a Finnish student named Linus Torvalds wanted an operating system he could tinker with on his personal computer. Inspired by a smaller system called MINIX, he began writing his own core, or kernel. He posted about his project online, shared the code freely, and invited others to contribute.
People were excited. They combined Torvalds' kernel with tools from the GNU Project, a collection of free software, creating a complete, open-source operating system. The result was Linux.
kernel
noun
The core program of an operating system that manages the system's resources and allows hardware and software to communicate.
Because the source code is open, anyone can modify it. This led to hundreds of different versions of Linux, known as distributions or "distros." Each distro packages the Linux kernel with its own set of software and tools. Popular examples include Ubuntu, Fedora, and Debian. While they look different, they all share the same powerful foundation.
The File System Tree
In Linux, everything is treated as a file. This includes documents, programs, and even devices like your mouse and keyboard. These files are organized in a hierarchical structure, like an upside-down tree. The very top of this tree is called the root directory, represented by a single forward slash (/).
Every other file and directory exists inside this root directory. While there are many standard directories, here are a few key ones to know:
| Directory | Purpose |
|---|---|
/ | The root directory; the top of the entire file system. |
/home | Contains personal directories for each user. |
/bin | Holds essential command programs (binaries) available to all users. |
/etc | Contains system-wide configuration files. |
/var | Stores variable data, like system logs. |
Your First Commands
The most direct way to interact with Linux is through the command-line interface (CLI), often called the terminal or shell. It's a text-based environment where you type commands to tell the computer what to do. It might seem intimidating, but it's incredibly powerful.
Let's try a few basic commands to navigate the file system.
The first question when you open a terminal is often, "Where am I?"
The pwd command, short for "print working directory," tells you your current location in the file system.
# Type this command and press Enter
pwd
# Output might look like this:
/home/user
Now that you know where you are, you can see what's inside that directory with the ls command, which stands for "list."
# List the contents of the current directory
ls
# Output could be:
Documents Downloads Music Pictures
Finally, to move around, you use the cd command, for "change directory." You just need to tell it where you want to go. For instance, let's move into the Documents directory.
# Move into the Documents directory
cd Documents
# Now, if you run pwd again...
pwd
# The output will show your new location:
/home/user/Documents
To move back up one level, you can use cd .. where .. is a special shortcut for the parent directory.
Ready to check what you've learned?
Who is credited with starting the Linux kernel as a hobby project in 1991?
In Linux, different versions that bundle the kernel with a specific set of software and tools (like Ubuntu, Fedora, or Debian) are called what?
These are the first steps into a much larger world. With just these simple ideas—the open-source kernel, the file system tree, and a few commands—you have the foundation for mastering Linux.
