The Wiley “by professionals for professionals” commitment. Mastering authors are themselves practitioners, with plenty of credentials in their areas of specialty.
A practical perspective for a reader who already knows the basics—someone who needs solutions, not a primer.
Real‐World Scenarios, ranging from case studies to interviews, that show how the tool, technique, or knowledge presented is applied in actual practice.
Skill‐based instruction, with chapters organized around real tasks rather than abstract concepts or subjects.
Self‐review test “Master It” problems and questions, so you can be certain you're equipped to do the job right.
How to Contact Wiley or the Authors
Sybex strives to keep you supplied with the latest tools and information you need for your work. If you believe you have found an error in this book and it is not listed on the book's web page, you can report the issue to the Wiley customer support team at wileysupport.com
.
You can email the authors with your comments or questions at rich@richblum.com
.
Chapter 1 Understanding the Basics
The Linux operating system has taken the world by storm. Whether it's embedded Linux software operating in phones and refrigerators or full‐blown Linux servers running famous Internet sites, you can find Linux systems just about everywhere. If you've chosen (or have been chosen) to be a Linux system administrator, the task before you can seem daunting at first. But don't panic—while complex, the Linux system is organized and structured. Just knowing the basics of how Linux works will go a long way in helping you with your goals of becoming a Linux system administrator. This chapter walks you through the basics of what Linux is and explains the different versions of Linux that are available.
IN THIS CHAPTER, YOU WILL LEARN TO
List the components of a standard Linux system
Explain how GNU utilities are used in Linux
Describe the various Linux user interface environments
Explain why there are different Linux distributions
If you've never worked with Linux, you may be confused as to why there are so many different versions of it available. You've probably heard various terms such as distribution , LiveDVD , and GNU when looking at Linux packages, and may have been confused. Wading through the world of Linux for the first time can be a tricky experience. This chapter takes some of the mystery out of the Linux system before you start working on commands and scripts.
For starters, these four main parts make up a Linux system:
The Linux kernel
The GNU utilities
A user interface
Application software
Each of these four parts has a specific job in the Linux system. Figure 1.1shows a basic diagram of how the parts fit together on top of the computer hardware to create the overall Linux system.

FIGURE 1.1The Linux system
This section describes these four main parts in detail and gives you an overview of how they work together to create a complete Linux system.
Looking into the Linux Kernel
The core of the Linux system is the kernel . The kernel controls all of the hardware and software on the computer system, allocating hardware when necessary and executing software when required.
If you've been following the Linux world at all, no doubt you've heard the name Linus Torvalds. Linus is the person responsible for creating the first Linux kernel software while he was a student at the University of Helsinki. He intended it to be a copy of the Unix system, at the time a popular operating system used at many universities.
After developing the Linux kernel, Linus released it to the Internet community and solicited suggestions for improving it. This simple process started a revolution in the world of computer operating systems. Soon Linus was receiving suggestions from students as well as professional programmers from around the world.
Allowing anyone to change programming code in the kernel would result in complete chaos. To simplify things, Linus acted as a central point for all improvement suggestions. It was ultimately Linus's decision whether to incorporate suggested code in the kernel. This same concept is still in place with the Linux kernel code, except that instead of just Linus controlling the kernel code, a team of developers has taken on the task.
The kernel is primarily responsible for these four main functions:
System memory management
Software program management
Hardware management
Filesystem management
The following sections explore each of these functions in more detail.
One of the primary functions of the operating system kernel is memory management. Not only does the kernel manage the physical memory available on the server, but it can also create and manage virtual memory, or memory that does not actually exist.
It does this by using space on the hard disk, called the swap space . The kernel swaps the contents of virtual memory locations back and forth from the swap space to the actual physical memory. This allows the system to think there is more memory available than what physically exists (shown in Figure 1.2).
FIGURE 1.2The Linux system memory map
The memory locations are grouped into blocks called pages . The kernel locates each page of memory either in the physical memory or in the swap space. The kernel then maintains a table of the memory pages that indicates which pages are in physical memory and which pages are swapped out to disk.
The kernel keeps track of which memory pages are in use and automatically copies memory pages that have not been accessed for a period of time to the swap space area (called swapping out ), even if there's other memory available. When a program wants to access a memory page that has been swapped out, the kernel must make room for it in physical memory by swapping out a different memory page and swapping in the required page from the swap space. Obviously, this process takes time and can slow down a running process. The process of swapping out memory pages for running applications continues for as long as the Linux system is running.
Real World Scenario
LOOKING AT MEMORY
There are a couple of simple commands you can use to get an idea of just how your Linux system is managing memory. While we'll be exploring these commands in more detail later in the book, here's a quick exercise for you to get started exploring your Linux system:
1 Log into your Linux system. (If you don't have a Linux system available yet, you can come back to here after going through either Chapter 2, “Installing an Ubuntu Server,” or Chapter 4, “Installing a Red Hat Server.”)
2 From the command prompt, enter the command free. You should see something similar to this output:$ free total used free shared buff/cache available Mem: 2035504 135668 1449568 1048 450268 1742704 Swap: 2097148 0 2097148The output from the free command shows the total amount of physical memory installed on the system, as well as the amount of swap space currently configured.
Читать дальше