Preface |
|
xv | |
Acknowledgments and Contributions |
|
xix | |
Author |
|
xxi | |
Chapter 1 Linux: What, Why, Who and When, and How |
|
1 | (38) |
|
|
1 | (3) |
|
|
4 | (7) |
|
1.2.1 Early Operating Systems |
|
|
4 | (1) |
|
1.2.2 The Operating System Kernel |
|
|
5 | (4) |
|
1.2.3 Other Operating System Components |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
11 | (1) |
|
1.4 Who Developed Linux and When? |
|
|
12 | (9) |
|
1.4.1 The Birth and Development of Unix |
|
|
12 | (2) |
|
|
14 | (1) |
|
1.4.3 Enter Linus Torvalds |
|
|
15 | (3) |
|
1.4.4 The Open-Source Community |
|
|
18 | (3) |
|
1.5 How Do You Use Linux? |
|
|
21 | (13) |
|
1.5.1 Installing Debian Linux |
|
|
21 | (2) |
|
1.5.2 Installing CentOS Linux |
|
|
23 | (6) |
|
1.5.3 Installing Ubuntu Linux |
|
|
29 | (1) |
|
1.5.4 Installing Linux Mint |
|
|
30 | (2) |
|
1.5.5 An Introduction to the Shell and Command Line |
|
|
32 | (2) |
|
|
34 | (3) |
|
|
37 | (2) |
Chapter 2 Bash |
|
39 | (46) |
|
|
39 | (2) |
|
2.2 Entering Linux Commands |
|
|
41 | (5) |
|
2.2.1 Simple Linux Commands |
|
|
41 | (2) |
|
2.2.2 Commands with Options and Parameters |
|
|
43 | (3) |
|
|
46 | (6) |
|
|
46 | (1) |
|
2.3.2 Other Forms of Command-Line Help |
|
|
47 | (5) |
|
|
52 | (15) |
|
2.4.1 Recalling Commands through the History List |
|
|
52 | (1) |
|
|
53 | (6) |
|
|
59 | (1) |
|
2.4.4 Command-Line Editing |
|
|
60 | (2) |
|
|
62 | (2) |
|
2.4.6 Other Useful Bash Features |
|
|
64 | (3) |
|
2.5 Tailoring Our Environment |
|
|
67 | (3) |
|
|
70 | (4) |
|
|
70 | (3) |
|
2.6.2 An Example to Illustrate How to Use vi |
|
|
73 | (1) |
|
|
74 | (4) |
|
2.7.1 Interpreters in Programming Languages |
|
|
75 | (1) |
|
2.7.2 Interpreters in Shells |
|
|
76 | (1) |
|
2.7.3 The Bash Interpreter |
|
|
77 | (1) |
|
|
78 | (2) |
|
|
80 | (5) |
Chapter 3 Linux File Commands |
|
85 | (50) |
|
|
85 | (1) |
|
|
86 | (3) |
|
3.3 Filename Specification |
|
|
89 | (6) |
|
|
89 | (2) |
|
3.3.2 Filename Arguments with Paths |
|
|
91 | (1) |
|
|
92 | (1) |
|
3.3.4 Specifying Filenames with Wildcards |
|
|
92 | (3) |
|
|
95 | (11) |
|
|
96 | (1) |
|
3.4.2 File Movement and Copy Commands |
|
|
97 | (2) |
|
3.4.3 File Deletion Commands |
|
|
99 | (1) |
|
3.4.4 Creating and Deleting Directories |
|
|
100 | (1) |
|
3.4.5 Textfile Viewing Commands |
|
|
100 | (1) |
|
3.4.6 File Comparison Commands |
|
|
101 | (2) |
|
3.4.7 File Manipulation Commands |
|
|
103 | (1) |
|
3.4.8 Miscellaneous but Useful File Commands |
|
|
104 | (2) |
|
|
106 | (6) |
|
3.5.1 What Are Permissions? |
|
|
106 | (1) |
|
3.5.2 Altering Permissions from the Command Line |
|
|
107 | (2) |
|
3.5.3 Altering Permissions from the GUI |
|
|
109 | (1) |
|
3.5.4 Advanced Permissions |
|
|
110 | (2) |
|
3.6 Hard and Symbolic Links |
|
|
112 | (2) |
|
|
114 | (5) |
|
3.7.1 Search Using the File Browser |
|
|
114 | (1) |
|
|
115 | (3) |
|
3.7.3 Other Means of Locating Files |
|
|
118 | (1) |
|
3.8 Secondary Storage Devices |
|
|
119 | (5) |
|
3.8.1 The Hard Disk Drive |
|
|
119 | (3) |
|
|
122 | (1) |
|
|
122 | (1) |
|
3.8.4 Flash Memory Drives |
|
|
123 | (1) |
|
|
124 | (1) |
|
|
124 | (3) |
|
3.9.1 Types of File Compression |
|
|
124 | (1) |
|
3.9.2 The Lempel-Ziv Algorithms for Lossless Compression |
|
|
125 | (1) |
|
3.9.3 Other Lossless Compression Algorithms |
|
|
126 | (1) |
|
3.9.4 Compression and Decompression Programs in Linux |
|
|
127 | (1) |
|
|
127 | (3) |
|
|
130 | (5) |
Chapter 4 Managing Processes |
|
135 | (44) |
|
|
135 | (2) |
|
4.2 Forms of Process Management |
|
|
137 | (6) |
|
4.2.1 Single-Process Execution |
|
|
138 | (1) |
|
4.2.2 Concurrent Processing |
|
|
139 | (3) |
|
|
142 | (1) |
|
4.3 Starting, Pausing and Resuming Processes |
|
|
143 | (6) |
|
4.3.1 Ownership of Running Processes |
|
|
144 | (1) |
|
4.3.2 Launching Processes from the Command Line |
|
|
145 | (2) |
|
4.3.3 Suspending and Resuming Processes from the Command Line |
|
|
147 | (2) |
|
|
149 | (8) |
|
4.4.1 GUI Monitoring Tools |
|
|
150 | (2) |
|
4.4.2 Command-Line Monitoring Tools |
|
|
152 | (5) |
|
4.5 Managing Process Priority |
|
|
157 | (5) |
|
|
162 | (4) |
|
4.6.1 Orphans and Zombies |
|
|
162 | (1) |
|
|
162 | (2) |
|
4.6.3 Shutting Down Linux |
|
|
164 | (2) |
|
4.7 A Look at System Resources |
|
|
166 | (6) |
|
4.7.1 Memory and Virtual Memory |
|
|
166 | (3) |
|
4.7.2 Linux Commands to Inspect System Resources |
|
|
169 | (3) |
|
|
172 | (3) |
|
|
175 | (4) |
Chapter 5 Regular Expressions |
|
179 | (50) |
|
|
179 | (1) |
|
|
180 | (13) |
|
5.2.1 Controlling Repeated Characters through *, + and ? |
|
|
182 | (1) |
|
5.2.2 Using and Modifying the . Metacharacter |
|
|
183 | (1) |
|
5.2.3 Controlling Where a Pattern Matches |
|
|
184 | (1) |
|
5.2.4 Matching from a List of Options |
|
|
185 | (2) |
|
5.2.5 Matching Characters That Must Not Appear |
|
|
187 | (1) |
|
5.2.6 Matching Metacharacters Literally |
|
|
188 | (1) |
|
5.2.7 More Precisely Controlling Repetition |
|
|
189 | (1) |
|
5.2.8 Selecting between Sequences |
|
|
190 | (3) |
|
|
193 | (4) |
|
|
197 | (9) |
|
|
198 | (2) |
|
5.4.2 Useful egrep Options |
|
|
200 | (2) |
|
5.4.3 Examples: Searching the Linux Dictionary |
|
|
202 | (2) |
|
5.4.4 Using egrep to Control the Output of Other Linux Commands |
|
|
204 | (2) |
|
|
206 | (6) |
|
|
206 | (2) |
|
|
208 | (3) |
|
5.5.3 Other sed Capabilities |
|
|
211 | (1) |
|
|
212 | (9) |
|
5.6.1 awk Condition-Action Pairs |
|
|
212 | (4) |
|
5.6.2 BEGIN and END Sections |
|
|
216 | (1) |
|
5.6.3 Other Forms of Control |
|
|
217 | (2) |
|
5.6.4 awk Command Line Options and Arguments |
|
|
219 | (1) |
|
5.6.5 Non-File Input to awk |
|
|
220 | (1) |
|
|
221 | (1) |
|
|
222 | (7) |
Chapter 6 Shell Scripting |
|
229 | (54) |
|
|
229 | (1) |
|
|
230 | (3) |
|
6.2.1 Scripts of Linux Instructions |
|
|
230 | (1) |
|
|
230 | (1) |
|
|
231 | (2) |
|
6.3 Variables, Assignments and Parameters |
|
|
233 | (7) |
|
|
233 | (1) |
|
6.3.2 Assignment Statements |
|
|
233 | (1) |
|
6.3.3 Executing Linux Commands from within Assignment Statements |
|
|
234 | (2) |
|
6.3.4 Arithmetic Operations in Assignment Statements |
|
|
236 | (2) |
|
6.3.5 String Operations Using expr |
|
|
238 | (1) |
|
6.3.6 Command-Line Parameters |
|
|
239 | (1) |
|
|
240 | (5) |
|
|
240 | (3) |
|
|
243 | (2) |
|
|
245 | (11) |
|
6.5.1 Conditions for Strings and Integers |
|
|
246 | (1) |
|
|
247 | (2) |
|
6.5.3 The if-then and if-then-else Statements |
|
|
249 | (1) |
|
|
250 | (3) |
|
|
253 | (3) |
|
6.5.6 Conditions Outside of Selection Statements |
|
|
256 | (1) |
|
|
256 | (8) |
|
|
257 | (2) |
|
6.6.2 Counter-Controlled Loops |
|
|
259 | (1) |
|
|
259 | (3) |
|
6.6.4 Using the seq Command to Generate a List |
|
|
262 | (1) |
|
6.6.5 The while read Statement |
|
|
263 | (1) |
|
|
264 | (4) |
|
6.7.1 Declaring and Initializing Arrays |
|
|
265 | (1) |
|
6.7.2 Accessing Array Elements and Entire Arrays |
|
|
265 | (1) |
|
6.7.3 Example Scripts Using Arrays |
|
|
266 | (2) |
|
|
268 | (3) |
|
6.8.1 Substrings Revisited |
|
|
268 | (1) |
|
6.8.2 String Regular Expression Matching |
|
|
269 | (2) |
|
|
271 | (4) |
|
6.9.1 Defining Bash Functions |
|
|
271 | (1) |
|
|
271 | (2) |
|
6.9.3 Functions and Variables |
|
|
273 | (1) |
|
6.9.4 exit and return Statements |
|
|
274 | (1) |
|
|
275 | (3) |
|
|
278 | (5) |
Chapter 7 User Accounts |
|
283 | (44) |
|
|
283 | (1) |
|
7.2 Creating Accounts and Groups |
|
|
284 | (12) |
|
7.2.1 Creating User and Group Accounts through the GUI |
|
|
285 | (4) |
|
7.2.2 Creating User and Group Accounts from the Command Line |
|
|
289 | (4) |
|
7.2.3 Creating a Large Number of User Accounts |
|
|
293 | (3) |
|
7.3 Managing Users and Groups |
|
|
296 | (2) |
|
|
298 | (4) |
|
7.4.1 Automatically Generating Passwords |
|
|
298 | |
|
|
100 | (202) |
|
7.5 PAM and Enforcing Strong Passwords |
|
|
302 | (5) |
|
7.6 Establishing Common User Resources |
|
|
307 | (3) |
|
7.6.1 Populating User Home Directories with Initial Files |
|
|
307 | (1) |
|
7.6.2 Initial User Settings and Defaults |
|
|
308 | (2) |
|
|
310 | |
|
|
112 | (204) |
|
|
113 | (201) |
|
7.8.2 A Closer Look at Contexts |
|
|
314 | |
|
|
115 | (201) |
|
7.9 Establishing User and Group Policies |
|
|
316 | (3) |
|
|
319 | (2) |
|
|
321 | (6) |
Chapter 8 Administering Linux File Systems |
|
327 | (56) |
|
|
327 | (1) |
|
|
328 | (5) |
|
8.2.1 Disk Storage and Blocks |
|
|
328 | (1) |
|
8.2.2 Block Indexing Using a File Allocation Table |
|
|
329 | (1) |
|
8.2.3 Other Disk Storage Details |
|
|
330 | (1) |
|
8.2.4 File Storage and Object Storage |
|
|
331 | (2) |
|
|
333 | (4) |
|
8.3.1 Files versus Directories |
|
|
333 | (1) |
|
8.3.2 Non-File File Types |
|
|
333 | (2) |
|
8.3.3 Links as File Types |
|
|
335 | (1) |
|
8.3.4 Reviewing the File Types |
|
|
336 | (1) |
|
|
337 | (7) |
|
|
317 | (21) |
|
|
338 | (2) |
|
8.4.3 Linux Commands to Inspect inodes and Files |
|
|
340 | (4) |
|
8.5 Partitions and File Systems |
|
|
344 | (11) |
|
|
344 | (1) |
|
8.5.2 Viewing the Available Partitions |
|
|
345 | (2) |
|
8.5.3 Creating Partitions |
|
|
347 | (2) |
|
|
349 | (2) |
|
8.5.5 Using a Logical Volume Manager to Partition |
|
|
351 | (2) |
|
8.5.6 Adding a Disk Drive |
|
|
353 | (2) |
|
8.6 Administrative File System Tasks |
|
|
355 | (12) |
|
8.6.1 Mounting and Unmounting File Systems |
|
|
356 | (2) |
|
8.6.2 Remote File Systems |
|
|
358 | (1) |
|
8.6.3 Establishing Quotas on a File System |
|
|
359 | (2) |
|
8.6.4 Miscellaneous Administrative File System Commands |
|
|
361 | (6) |
|
8.7 Linux Top-Level Directories |
|
|
367 | (8) |
|
8.7.1 Root (/) Partition Directories |
|
|
368 | (1) |
|
|
369 | (1) |
|
8.7.3 The /boot, /home and /var Directories |
|
|
369 | (3) |
|
8.7.4 Virtual File System Directories |
|
|
372 | (3) |
|
|
375 | (4) |
|
|
379 | (4) |
Chapter 9 System Initialization and Services |
|
383 | (50) |
|
|
383 | (1) |
|
|
384 | (6) |
|
9.2.1 Volatile and Non-Volatile Memory |
|
|
384 | (1) |
|
|
385 | (1) |
|
9.2.3 The Linux Boot Process |
|
|
385 | (4) |
|
9.2.4 Loading and Running the Linux Kernel |
|
|
389 | (1) |
|
9.3 Initialization of the Linux Operating System |
|
|
390 | (15) |
|
|
391 | (5) |
|
|
396 | (3) |
|
9.3.3 Other Unit File Types |
|
|
399 | (3) |
|
9.3.4 Modifying System Initialization |
|
|
402 | (3) |
|
|
405 | (6) |
|
|
405 | (1) |
|
9.4.2 An Examination of Significant Linux Services |
|
|
406 | (5) |
|
|
411 | (3) |
|
|
414 | (12) |
|
9.6.1 Non-Service Configuration Files |
|
|
415 | (2) |
|
9.6.2 Configuring rsyslog |
|
|
417 | (2) |
|
|
419 | (2) |
|
9.6.4 Configuring logrotate |
|
|
421 | (3) |
|
|
424 | (2) |
|
|
426 | (2) |
|
|
428 | (5) |
Chapter 10 Network Configuration |
|
433 | (56) |
|
|
433 | (1) |
|
10.2 Computer Networks and TCP/IP |
|
|
434 | (11) |
|
10.2.1 Network Connection Devices |
|
|
434 | (1) |
|
10.2.2 The TCP/IP Protocol Stack |
|
|
435 | (5) |
|
|
440 | (1) |
|
|
440 | (2) |
|
10.2.5 Domains, the Domain Name System and Host Names |
|
|
442 | (3) |
|
10.3 Linux NetworkManager Service and Related Services and Files |
|
|
445 | (8) |
|
|
446 | (3) |
|
10.3.2 Other Network Services of Note |
|
|
449 | (3) |
|
10.3.3 Establishing DNS Access |
|
|
452 | (1) |
|
10.4 Obtaining IP Addresses |
|
|
453 | (4) |
|
10.4.1 Configuring Our Interface Device(s) |
|
|
454 | (1) |
|
10.4.2 Setting Up a DHCP Server |
|
|
454 | (3) |
|
|
457 | (14) |
|
|
457 | (2) |
|
10.5.2 Remote Access and File Transfer Programs |
|
|
459 | (4) |
|
10.5.3 Network Inspection Programs |
|
|
463 | (2) |
|
10.5.4 Address Resolution Programs |
|
|
465 | (6) |
|
|
471 | (9) |
|
10.6.1 The firewalld Service |
|
|
472 | (1) |
|
10.6.2 The Firewall Configuration GUI Tool |
|
|
473 | (3) |
|
|
476 | (1) |
|
|
476 | (4) |
|
|
480 | (5) |
|
|
485 | (4) |
Chapter 11 Software Installation and Maintenance |
|
489 | (42) |
|
|
489 | (2) |
|
11.2 Software Maintenance Terminology |
|
|
491 | (5) |
|
11.2.1 Types of Programming Languages |
|
|
491 | (1) |
|
|
492 | (1) |
|
11.2.3 Types of Software Licenses |
|
|
493 | (1) |
|
11.2.4 Types of Software Management |
|
|
493 | (3) |
|
11.3 Installation and Maintenance from a Software Store |
|
|
496 | (6) |
|
11.3.1 Red Hat Software GUI |
|
|
496 | (2) |
|
11.3.2 Debian Mint Software GUI |
|
|
498 | (3) |
|
11.3.3 Ubuntu Software Center |
|
|
501 | (1) |
|
|
502 | (5) |
|
|
503 | (2) |
|
|
505 | (2) |
|
|
507 | (4) |
|
11.6 Installation of Source Code |
|
|
511 | (6) |
|
11.6.1 Obtaining Installation Packages |
|
|
512 | (1) |
|
11.6.2 Extracting from the Archive |
|
|
513 | (1) |
|
11.6.3 Running the configure Script |
|
|
514 | (1) |
|
11.6.4 The make Step and the makefile |
|
|
514 | (2) |
|
11.6.5 The make install Step |
|
|
516 | (1) |
|
|
517 | (6) |
|
|
518 | (1) |
|
11.7.2 Lexical Analysis and Syntactic Parsing |
|
|
518 | (2) |
|
11.7.3 Semantic Analysis, Compilation and Optimization |
|
|
520 | (1) |
|
|
520 | (2) |
|
|
522 | (1) |
|
11.8 Software Documentation |
|
|
523 | (2) |
|
|
525 | (3) |
|
|
528 | (3) |
Chapter 12 Maintaining and Troubleshooting Linux |
|
531 | (50) |
|
|
531 | (1) |
|
12.2 File System Integrity: Backups, RAID and Encryption |
|
|
532 | (15) |
|
12.2.1 Backups: Why, How and When |
|
|
532 | (5) |
|
12.2.2 RAID for File System Integrity |
|
|
537 | (6) |
|
12.2.3 Encryption and Encryption Programs |
|
|
543 | (4) |
|
|
547 | (4) |
|
|
547 | (2) |
|
|
549 | (2) |
|
|
551 | (9) |
|
12.4.1 Operating System Issues That Degrade Performance |
|
|
551 | (3) |
|
12.4.2 Processor and Process System Monitoring Tools |
|
|
554 | (1) |
|
12.4.3 Memory System Monitoring Tools |
|
|
555 | (2) |
|
12.4.4 I/O System Monitoring Tools |
|
|
557 | (3) |
|
|
560 | (9) |
|
12.5.1 rsyslogd-Created Log Files |
|
|
560 | (1) |
|
|
561 | (4) |
|
12.5.3 Examining the Log Files |
|
|
565 | (1) |
|
|
566 | (3) |
|
|
569 | (5) |
|
|
574 | (3) |
|
|
577 | (4) |
Bibliography |
|
581 | (8) |
Index |
|
589 | |