Introduction 1
About This Book 2
Foolish Assumptions 3
Icons Used in This Book 4
Beyond the Book 4
Where to Go from Here 5
Book 1: Getting Started With Linux 7
Chapter 1: Introducing Linux 9
What Is Linux? 9
Linux distributions 10
Making sense of version numbers 13
Linux Standard Base (LSB) 14
Contents of a Linux Distribution 15
GNU software 15
GUIs and applications 16
Networks 19
Internet servers 19
Software development 20
Online documentation 22
Managing Your PC with Linux 23
Distribution media 23
Peripheral devices 24
File systems and sharing 25
Network 25
Getting Started 26
Step 1: Install 26
Step 2: Configure 26
Step 3: Explore 27
Step 4: Find out more 27
Chapter 2: Installing Linux 29
Following the Installation Steps 29
Checking Your PC’s Hardware 31
Setting Aside Space for Linux 33
Trying a Live CD 34
Installing Linux on a Flash Drive 35
Creating the bootable flash drive 35
Troubleshooting the workstation 36
Working daily with the new drive 37
Chapter 3: Troubleshooting and Configuring Linux 39
Using Text Mode Installation 40
Troubleshooting X 40
Resolving Other Installation Problems 42
Using Knoppix boot commands 42
Handling the fatal signal 11 error 45
Getting around the PC reboot problem 45
Using Linux kernel boot options 48
Setting Up Printers 48
Managing DVDs, CD-ROMs, and Flash Drives 51
Installing Other Software 51
Installing software in Debian and Ubuntu 52
Installing software in Fedora 54
Installing software in SUSE 55
Chapter 4: Trying Out Linux 57
Starting Linux 57
Playing with the Shell 60
Starting the bash shell 61
Understanding shell commands 62
Trying a few Linux commands 62
Shutting Down 64
Book 2: Linux Desktops67
Chapter 1: GNOME and Its Derivatives 69
Getting to Know the GNOME Desktop 70
Understanding the GNOME Panels 72
The top panel 72
The desktop 72
The bottom panel 73
Looking at Unity 73
Looking at Cinnamon 73
Looking at MATE 74
Chapter 2: The KDE Plasma Desktop 75
Getting to Know the Plasma Desktop 75
Desktop contextual menus 77
Icon contextual menus 77
Understanding the Plasma Panel 78
The Main Menu button 79
Panel icons 80
Configuring the Plasma Bottom Panel 81
Configuring the Plasma Desktop 81
Chapter 3: Commanding the Shell83
Opening Terminal Windows and Virtual Consoles 83
Using the bash Shell 84
Understanding the syntax of shell commands 85
Combining shell commands 86
Controlling command input and output 87
Typing less with automatic command completion 89
Going wild with asterisks and question marks 90
Repeating previously typed commands 91
Discovering and Using Linux Commands 92
Becoming root (superuser) 97
Managing processes 97
Working with date and time 99
Processing files 100
Writing Shell Scripts 102
Chapter 4: Navigating the Linux File System 105
Understanding the Linux File System 105
Navigating the File System with Linux Commands 110
Commands for directory navigation 110
Commands for directory listings and permissions 112
Commands for changing permissions and ownerships 114
Commands for working with files 116
Commands for working with directories 117
Commands for finding files 118
Commands for mounting and unmounting 119
Commands for checking disk-space use 120
Chapter 5: Introducing Linux Applications 123
Taking Stock of Linux Applications 124
Introducing Office Applications and Tools 124
LibreOffice org office suite 125
Calendars 128
Calculators 128
Checking out Multimedia Applications 129
Using a digital camera 130
Playing audio CDs 131
Playing sound files 131
Burning a DVD or CD 132
Using Graphics and Imaging Apps 133
The GIMP 133
GNOME Ghostview 134
Chapter 6: Using Text Editors 137
Using GUI Text Editors 137
Text Editing with ed and vi 140
Using ed 141
Using vi 145
Book 3: Networking 151
Chapter 1: Connecting to the Internet 153
Understanding the Internet 154
Deciding How to Connect to the Internet 155
Connecting with DSL 156
How DSL works 156
DSL alphabet soup: ADSL, IDSL, SDSL 157
Typical DSL setup 158
Connecting with a Cable Modem 162
How a cable modem works 162
Typical cable modem setup 164
Chapter 2: Setting Up a Local Area Network 167
Understanding TCP/IP 167
IP addresses 169
Internet services and port numbers 170
Setting Up an Ethernet LAN 172
How Ethernet works 173
Ethernet cables 174
Configuring TCP/IP Networking 176
Connecting Your LAN to the Internet 178
Chapter 3: Going Wireless181
Understanding Wireless Ethernet Networks 181
Understanding infrastructure and ad hoc modes 183
Understanding Wired Equivalent Privacy (WEP) 183
Setting Up Wireless Hardware 184
Configuring the Wireless Access Point 185
Configuring Wireless Networking 186
Chapter 4: Managing the Network 191
Discovering the TCP/IP Configuration Files 191
/etc/hosts 192
/etc/networks 193
/etc/host.conf 193
/etc/resolv.conf 193
/etc/hosts.allow 194
/etc/hosts.deny 195
/etc/nsswitch.conf 195
Checking Out TCP/IP Networks 196
Checking the network interfaces 196
Checking the IP routing table 196
Checking connectivity to a host 197
Checking network status 198
Sniffing network packets 199
Using GUI tools 200
Configuring Networks at Boot Time 201
Book 4: The Internet 203
Chapter 1: Browsing the Web 205
Surfing the Web 205
Like a giant spider’s web 206
Links and URLs 206
Web servers and web browsers 209
Web Browsing in Linux 209
Checking out web browsers for Linux 210
Introducing Firefox’s user interface 210
Changing your home page 213
Surfing the Internet with Firefox 214
Chapter 2: Using FTP 217
Using Graphical FTP Clients 218
Using gFTP 218
Introducing FileZilla 220
Using a web browser as an FTP client 221
Using the Command-Line FTP Client 223
Chapter 3: Hosting Internet Services 229
Understanding Internet Services 229
TCP/IP and sockets 230
Internet services and port numbers 233
Using the Internet Super Server 235
Using inetd 236
Using xinetd 237
Running Stand-Alone Servers 239
Starting and stopping servers manually 240
Starting servers automatically at boot time 240
Chapter 4: Managing Mail Servers245
Installing the Mail Server 245
Using sendmail 245
A mail-delivery test 246
The mail-delivery mechanism 247
The sendmail configuration file 247
Syntax of the sendmail cf file 253
Other sendmail files 254
The forward file 256
The sendmail alias file 257
Chapter 5: Managing DNS 259
Understanding the Domain Name System (DNS) 259
What is DNS? 260
Discovering hierarchical domain names 261
Exploring BIND 262
Configuring DNS 266
Configuring the resolver 266
Configuring a caching name server 267
Configuring a primary name server 278
Book 5: Administration 281
Chapter 1: Introducing Basic System Administration 283
Taking Stock of System Administration Tasks 284
Becoming root 285
Using the su - command 285
Recovering from a forgotten root password 286
Understanding How Linux Boots 287
Understanding the init process 288
Examining the /etc/inittab file 289
Trying a new run level with the init command 291
Understanding the Linux startup scripts 291
Manually starting and stopping servers 292
Automatically starting servers at system startup 293
Taking Stock of Linux System Configuration Files 294
Monitoring System Performance 296
Using the top utility 297
Using the uptime command 298
Using the vmstat utility 299
Checking disk performance and disk usage 300
Viewing System Information with the /proc File System 302
Understanding Linux Devices 305
Device files 305
Persistent device naming with udev 307
Managing Loadable Driver Modules 308
Loading and unloading modules 308
Understanding the /etc/modprobe d files 309
Scheduling Jobs in Linux 310
Scheduling one-time jobs 310
Scheduling recurring jobs 312
Introducing Some GUI System Administration Tools 316
Chapter 2: Managing Users and Groups 319
Adding User Accounts 320
Managing user accounts by using a GUI user manager 320
Managing user accounts by using commands 322
Understanding the /etc/passwd File 323
Managing Groups 324
Setting Other User and Group Administration Values 325
Exploring the User Environment 326
Changing User and Group Ownership of Files 328
Chapter 3: Managing File Systems 331
Exploring the Linux File System 331
Understanding the file-system hierarchy 333
Mounting a device on the file system 336
Examining the /etc/fstab file 337
Sharing Files with NFS 339
Exporting a file system with NFS 340
Mounting an NFS file system 341
Backing Up and Restoring Files 341
Selecting a backup strategy and media 342
Commercial backup utilities for Linux 343
Using the tape archiver: tar 343
Accessing a DOS or Windows File System 348
Mounting a DOS or Windows disk partition 348
Mounting those ancient DOS floppy disks 349
Mounting an NTFS partition 351
Chapter 4: Working with Samba and NFS 353
Sharing Files with NFS 353
Exporting a file system with NFS 354
Mounting an NFS file system 357
Setting Up a Windows Server Using Samba 357
Installing Samba 359
Configuring Samba 359
Trying out Samba 360
Book 6: Security 363
Chapter 1: Introducing Linux Security 365
Why Worry about Security? 366
Establishing a Security Framework 366
Determining business requirements for security 368
Performing risk analysis 368
Establishing a security policy 370
Implementing security solutions (mitigation) 371
Managing security 372
Securing Linux 372
Understanding the host-security issues 373
Understanding network-security issues 374
Delving Into Computer Security Terminology and Tools 375
Keeping Up with Security News and Updates 379
Chapter 2: Securing Linux381
Securing Passwords 382
Shadow passwords 382
Pluggable authentication modules (PAMs) 383
Protecting Files and Directories 384
Viewing ownerships and permissions 385
Changing file ownerships 385
Changing file permissions 385
Setting default permission 386
Checking for set user ID permission 388
Encrypting and Signing Files with GnuPG 389
Understanding public key encryption 389
Understanding digital signatures 390
Using GPG 391
Monitoring System Security 396
Securing Internet Services 397
Turning off stand-alone services 397
Configuring the Internet super server 398
Configuring TCP wrapper security 398
Using Secure Shell for Remote Logins 399
Setting Up Simple Firewalls 402
Using NAT 405
Enabling packet filtering on your Linux system 406
Security Files to Be Aware Of 411
Chapter 3: Vulnerability Testing and Computer Security Audits 413
Understanding Security Audits 414
Nontechnical aspects of security audits 414
Technical aspects of security audits 415
Implementing a Security Test Methodology 416
Some common computer vulnerabilities 417
Host-security review 418
Network-security review 422
Vulnerability Testing Types 424
Exploring Security Testing Tools 425
Book 7: Scripting 429
Chapter 1: Introductory Shell Scripting 431
Trying Out Simple Shell Scripts 432
Exploring the Basics of Shell Scripting 433
Storing stuff 434
Calling shell functions 435
Controlling the flow 435
Exploring bash’s built-in commands 439
Chapter 2: Working with Advanced Shell Scripting443
Trying Out sed 443
Working with awk and sed 446
Step 1: Pull out the ISBN 447
Step 2: Calculate the 13th digit 448
Step 3: Add the 13th digit to the other 12 449
Step 4: Finish the process 450
Final Notes on Shell Scripting 450
Chapter 3: Programming in Linux 451
An Overview of Programming 452
Exploring the Software-Development Tools in Linux 453
GNU C and C++ compilers 454
The GNU make utility 458
The GNU debugger 466
Understanding the Implications of GNU Licenses 473
The GNU General Public License 473
The GNU Library General Public License 474
Book 8: Linux Certification 477
Chapter 1: Studying for the Linux Essentials Certification Exam 479
Overview of Linux Essentials 479
The Linux Community and a Career in Open Source 480
Finding Your Way on a Linux System 482
The Power of the Command Line 483
The Linux Operating System 485
Security and File Permissions 486
Chapter 2: Studying for the CompTIA Linux+ Powered by LPI Certification Exams 489
Overview of the CompTIA Linux+ Exams 489
System Architecture 490
Linux Installation and Package Management 492
GNU and Unix Commands 494
Devices, Linux File Systems, Filesystem Hierarchy Standard 495
Shells, Scripting, and Data Management 497
User Interfaces and Desktops 498
Administrative Tasks 500
Essential System Services 501
Networking Fundamentals 502
Security 504
Chapter 3: Other Linux Certifications 507
Vendor-Neutral Certifications 507
Vendor-Specific Certifications 508
Index 509