Linux Bible. Christopher Negus
Читать онлайн книгу.I wrote my first Linux book, the Red Hat Linux Bible. The book's huge success gave me the opportunity to become a full-time, independent Linux author. For about a decade, I wrote dozens of Linux books and explored the best ways to explain Linux from the quiet of my small home office.
In 2008, I hit the road. I was hired by Red Hat, Inc., as a full-time instructor, teaching Linux to professional system administrators seeking Red Hat Certified Engineer (RHCE) certification. In my three years as a Linux instructor, I honed my teaching skills in front of a live audience whose Linux experience ranged from none to experienced professionals. Over time, I was able to broaden my own knowledge of Linux by acquiring about 10 certifications, including the Red Hat Certified Architect (RHCA) certification.
In the previous edition of the Linux Bible, I turned my teaching experience into text to take a reader from someone who has never used Linux to someone with the foundational skills to become a Linux professional. The skills that you could acquire from that edition remain in effect in this edition as well. They include the following:
Beginner to certified professional: As long as you have used a computer, mouse, and keyboard, you can start with this book. I tell you how to get Linux, begin using it, step through critical topics, and ultimately excel at administering and securing it.
System administrator focused: When you are finished with this book, you will know how to use Linux and how to modify and maintain it. Almost all of the topics needed to become a Red Hat Certified Engineer are introduced in this book. That said, many software developers have also used this book to understand how to work on a Linux system as a development platform or target for their applications.
Emphasis on command-line tools: Although point-and-click windows for managing Linux have improved greatly in recent years, many advanced features can only be utilized by entering commands and editing configuration files manually. I teach you how to become proficient with the Linux command-line shell, and I occasionally compare shell features with graphical tools for accomplishing the same tasks.
Aimed at fewer Linux distributions: In past editions, I described about 18 different Linux distributions. With only a few notable exceptions, most popular Linux distributions are either Red Hat based (Red Hat Enterprise Linux, Fedora, CentOS, and so on) or Debian based (Ubuntu, Linux Mint, KNOPPIX, and so forth). Although this book most thoroughly covers Red Hat distributions, I increased the coverage of Ubuntu throughout the book, because that's where many of the biggest Linux fans begin.
Many, many demos and exercises: Instead of just telling you what Linux does, I actually show you what it does. Then, to make sure that you got it, you have the opportunity to try Linux exercises yourself. Every procedure and exercise has been tested to work in Fedora or Red Hat Enterprise Linux. Most work in Ubuntu as well.
For this 10th edition, major enhancements include a focus on simplified Linux administration, automating tasks, and managing containerized applications (individually or at scale):
Cockpit administration web UI: Since Linux was created, people have tried to develop simple graphical or browser-based interfaces for managing Linux systems. I believe that Cockpit is the best web UI ever created for managing most basic Linux features. Throughout this book, I have replaced most older system-config* tool descriptions with those focusing on Cockpit. With Cockpit, you can now add users, manage storage, monitor activities, and do many other administrative tasks through a single interface.
Lead into cloud technologies: After introducing cloud technologies in the previous edition, I've expanded on that coverage here. This coverage includes setting up your own Linux host for running virtual machines and running Linux in a cloud environment, such as Amazon Web Services. Linux is at the heart of most technological advances in cloud computing today. That means you need a solid understanding of Linux to work effectively in tomorrow's data centers. I help you learn Linux basics in the front of this book. Then in the last few chapters, I demonstrate how you can try out Linux systems as hypervisors, cloud controllers, and virtual machines as well as manage virtual networks and networked storage.
Ansible: Automating tasks for managing systems is becoming more and more essential in modern data centers. Using Ansible, you can create playbooks that define the state of a Linux system. This includes things like setting which packages are installed, which services are running, and how features are configured. A playbook can configure one system or a thousand systems, be combined to form a set of system services, and be run again to return a system to a defined state. In this edition, I introduce you to Ansible, help you create your first Ansible playbook, and show you how to run ad-hoc Ansible commands.
Containers: Packaging and running applications in containers is becoming the preferred method for deploying, managing, and updating small, scalable software services and features. I describe how to pull containers to your system, run them, stop them, and even build your own container images using podman and docker commands.
Kubernetes and OpenShift: While containers are nice on their own, to be able to deploy, manage, and upgrade containers in a large enterprise, you need an orchestration platform. The Kubernetes project provides that platform. For a commercial, supported Kubernetes platform, you can use a product such as OpenShift.
How This Book Is Organized
The book is organized to enable you to start off at the very beginning with Linux and grow to become a professional Linux system administrator and power user.
Part I, “Getting Started,” includes two chapters designed to help you understand what Linux is and get you started with a Linux desktop:
Chapter 1, “Starting with Linux,” covers topics such as what the Linux operating system is, where it comes from, and how to get started using it.
Chapter 2, “Creating the Perfect Linux Desktop,” provides information on how you can create a desktop system and use some of the most popular desktop features.
Part II, “Becoming a Linux Power User,” provides in-depth details on how to use the Linux shell, work with filesystems, manipulate text files, manage processes, and use shell scripts:
Chapter 3, “Using the Shell,” includes information on how to access a shell, run commands, recall commands (using history), and do tab completion. The chapter also describes how to use variables, aliases, and man pages (traditional Linux command reference pages).
Chapter 4, “Moving Around the Filesystem,” includes commands for listing, creating, copying, and moving files and directories. More advanced topics in this chapter include filesystem security, such as file ownership, permissions, and access control lists.
Chapter 5, “Working with Text Files,” includes everything from basic text editors to tools for finding files and searching for text within files.
Chapter 6, “Managing Running Processes,” describes how to see what processes are running on your system and change them. Ways of changing processes include killing, pausing, and sending other types of signals.
Chapter 7, “Writing Simple Shell Scripts,” includes shell commands and functions that you can gather together into a file to run as a command itself.
In Part III,