A warm welcome to Learning Modern Linux ! I’m glad that we will walk this journey together for a bit. This book is for you if you’ve already been using Linux and are looking for a structured, hands-on approach to dive in deeper, or if you already have experience and want to get some tips and tricks to improve your flow when working with Linux—for example, in a professional setup, such as development or operations.
We’ll focus on using Linux for your everyday needs, from development to office-related tasks, rather than on the system administration side of things. Also, we’ll focus on the command line, not visual UIs. So, while 2022 might be the year of Linux on the desktop after all, we’ll use the terminal as the main way to interact with Linux. This has the additional advantage that you can equally apply your knowledge in many different setups, from a Raspberry Pi to the virtual machine of your cloud provider of choice.
Before we start, I’d like to provide some context by sharing my own journey: my first hands-on experience with an operating system was not with Linux. The first operating system I used was AmigaOS (in the late 80s), and after that, in technical high school, I mainly used Microsoft DOS and the then-new Microsoft Windows, specifically around the event system and user interface–related development. Then, in the mid- to late 1990s, during my studies at university, I mainly used Unix-based Solaris and Silicon Graphics machines in the university labs. I really only got into Linux in the mid-2000s in the context of big data and then when I started working with containers, first in 2015 in the context of Apache Mesos (working at Mesosphere), and then with Kubernetes (initially at Red Hat on the OpenShift team and then at AWS on the container service team). That’s where I realized that one needs to master Linux to be effective in this space. Linux is different. Its background, worldwide community of users, and versatility and flexibility make it unique.
Linux is an interesting, ever-growing ecosystem of open source individuals and vendors. It runs on pretty much anything under the sun, from the $50 Raspberry Pi to the virtual machines of your favorite cloud provider to a Mars vehicle. After 30 years in the making, Linux will likely stick around for some time, so now is a good time to get into Linux a bit deeper.
Let’s first set some ground rules and expectations. In the preface, I’ll share how you can get the most out of this book as well as some administrative things, like where and how you can try out the topics we’ll work through together.
About You
This book is for those who want or need to use Linux in a professional setup, such as software developers, software architects, QA testing engineers, DevOps and SRE roles, and similar roles. I’ll assume that if you’re a hobbyist encountering Linux when pursuing an activity such as 3D printing or home improvement, you have very little to no knowledge about operating systems in general or Linux/UNIX in particular. You will get the most out of the book if you work through it from beginning to end, as the chapters tend to build on one another; however, you can also use it as a reference if you’re already familiar with Linux.
How to Use the Book
The focus of this book is enabling you to use Linux, not administer it. There are plenty of great books about Linux administration out there.
By the end of this book, you will understand what Linux is ( Chapter 1 ) and what its critical components are (Chapters 2 and 3 ). You’ll be able to enumerate and use essential access control mechanisms ( Chapter 4 ). You’ll also understand the role of filesystems ( Chapter 5 ) as a fundamental building block in Linux as well as know what apps ( Chapter 6 ) are.
Then, you’ll get some hands-on experience with the Linux networking stack and tooling ( Chapter 7 ). Further, you’ll learn about modern operating system observability ( Chapter 8 ) and how to apply it to manage your workloads.
You’ll understand how to run Linux applications in modern ways by using containers as well as immutable distros such as Bottlerocket and also how to securely communicate (download files, etc.) and share data using Secure Shell (SSH) and advanced tooling like peer-to-peer and cloud sync mechanisms ( Chapter 9 ).
Following are suggestions for ways you can try things out and follow along (and I strongly recommend you do; learning Linux is like learning a language—you want to practice a lot):
-
Get a Linux desktop or laptop. For example, I have a very nice machine called StarBook from Star Labs . Alternatively, you could use a desktop or laptop that no longer runs a recent Windows version and install Linux on it.
-
If you want to experiment on a different (host) operating system—say, your MacBook or iMac—you could use a virtual machine (VM). For example, on macOS you could use the excellent Linux-on-Mac .
-
Use your cloud provider of choice to spin up a Linux-based VM.
-
If you’re into tinkering and want to try out a non-Intel processor architecture such as ARM, you could buy a single-board computer such as the wonderful Raspberry Pi .
In any case, you should have an environment at hand and practice a lot. Don’t just read: try out commands and experiment. Try to “break” things, for example, by providing nonsensical or deliberately strange inputs. Before you execute the command, form a hypothesis about the outcome.
Another tip: always ask why . When you see a command or a certain output, try to figure out where it came from and what the underlying component responsible for it is.
Conventions
The following typographical conventions are used in this book:
Italic
Indicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.
Tip
This element signifies a tip or suggestion.
Note
This element signifies a general note.
Warning
This element indicates a warning or caution.
Using Code Examples
Supplemental material (code examples, exercises, etc.) is available for download at https://oreil.ly/learning-modern-linux-code .
If you have a technical question or a problem using the code examples, please send an email to [email protected] .
This book is here to help you get your job done. In general, if example code is offered with this book, you may use it in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.
We appreciate, but generally do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “ Learning Modern Linux by Michael Hausenblas (O’Reilly). Copyright 2022 Michael Hausenblas, 978-1-098-10894-6.”
If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at [email protected] .
O’Reilly Online Learning
Note
For more than 40 years, O’Reilly Media has provided technology and business training, knowledge, and insight to help companies succeed.
Our unique network of experts and innovators share their knowledge and expertise through books, articles, and our online learning platform. O’Reilly’s online learning platform gives you on-demand access to live training courses, in-depth learning paths, interactive coding environments, and a vast collection of text and video from O’Reilly and 200+ other publishers. For more information, visit http://oreilly.com .
How to Contact Us
Please address comments and questions concerning this book to the publisher:
- O’Reilly Media, Inc.
- 1005 Gravenstein Highway North
- Sebastopol, CA 95472
- 800-998-9938 (in the United States or Canada)
- 707-829-0515 (international or local)
- 707-829-0104 (fax)
We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at https://oreil.ly/learning-modern-linux .
Email [email protected] to comment or ask technical questions about this book.
For news and information about our books and courses, visit http://oreilly.com .
Find us on LinkedIn: https://linkedin.com/company/oreilly-media
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://youtube.com/oreillymedia
Acknowledgments
First off, I’d like to thank the fabulous reviewers of the book: Chris Negus, John Bonesio, and Pawel Krupa. Without their feedback, this book wouldn’t be half as good or useful.
I want to thank my parents, who enabled my education and laid the foundations for who I am and what I do today. Big kudos to my big sister, Monika, who was my inspiration to get into tech in the first place.
I would like to express my deepest gratitude to my very awesome and supportive family: my kids, Saphira, Ranya, and Iannis; my wicked smart and fun wife, Anneliese; our bestest of all dogs, Snoopy; and our newest family member, Charlie the tomcat.
In the context of my Unix and Linux journey, there are way too many people who influenced my thinking and from whom I learned a lot. I had the pleasure and privilege of working with or interacting with many of them, including but not limited to Jérôme Petazzoni, Jessie Frazelle, Brendan Gregg, Justin Garrison, Michael Kerrisk, and Douglas McIlroy.
Last, but most certainly not least, I’d like to thank the O’Reilly team, especially my development editor, Jeff Bleiel, for shepherding me through the process of writing this book.