ENGLISH

Ubuntu Linux Bible

Book information

Publisher
John Wiley & Sons
Year
2021
ISBN
1119722330, 9781119722335, 1119722349, 9781119722342, 1119722357, 9781119722359
Language
english
Format
PDF
Filesize
9 MB (9708260 bytes)
Edition
10th Edition
Pages
755\755
Time added
2021-02-10 11:20:02

Description

Quickly learn how to use Ubuntu, the fastest growing Linux distribution, in a personal or enterprise environment. Whether you’re a newcomer to Linux or an experienced system administrator, the Ubuntu Linux Bible provides what you need to get the most out of one the world’s top Linux distributions. Clear, step-by-step instructions cover everything from installing Ubuntu and creating your desktop, to writing shell scripts and setting up file sharing on your network. This up-to-date guide covers the latest Ubuntu release with long-term support (version 20.04 ) as well as the previous version. Throughout the book, numerous examples, figures, and review questions with answers ensure that you will fully understand each key topic. Organized into four parts, the book offers you the flexibility to master the basics in the "Getting Started with Ubuntu Linux” section, or to skip directly to more advanced tasks. "Ubuntu for Desktop Users” shows you how to setup email, surf the web, play games, and create and publish documents, spreadsheets, and presentations. “Ubuntu for System Administrators" covers user administration, system backup, device management, network configuration, and other fundamentals of Linux administration. The book’s final section, "Configuring Servers on Ubuntu," teaches you to use Ubuntu to support network servers for the web, e-mail, print services, networked file sharing, DHCP (network address management), and DNS (network name/address resolution). This comprehensive, easy-to-use guide will help you: • Install Ubuntu and create the perfect Linux desktop • Use the wide variety of software included with Ubuntu Linux • Stay up to date on recent changes and new versions of Ubuntu • Create and edit graphics, and work with consumer IoT electronic devices • Add printers, disks, and other devices to your system • Configure core network services and administer Ubuntu systems Ubuntu Linux Bible is a must-have for anyone looking for an accessible, step-by-step tutorial on this hugely popular Linux operating system. Cover......Page 1 Title Page......Page 5 Copyright Page......Page 6 About the Authors......Page 7 About the Technical Editor......Page 9 Acknowledgments......Page 11 Contents at a Glance......Page 13 Contents......Page 15 Introduction......Page 31 How This Book Is Organized......Page 32 Conventions Used in This Book......Page 35 How to Contact Wiley or the Authors......Page 36 Part I Getting Started......Page 37 Chapter 1 Starting with Linux......Page 39 Understanding What Linux Is......Page 40 Understanding How Linux Differs from Other Operating Systems......Page 42 Free-flowing UNIX culture at Bell Labs......Page 43 Berkeley Software Distribution arrives......Page 45 UNIX Laboratory and commercialization......Page 46 GNU transitions UNIX to freedom......Page 47 Linus builds the missing piece......Page 49 OSI open source definition......Page 50 Understanding How Linux Distributions Emerged......Page 52 Understanding Ubuntu and other Debian distributions......Page 53 Finding Professional Opportunities with Linux Today......Page 54 Understanding how companies make money with Linux......Page 55 Summary......Page 56 Chapter 2 Creating the Perfect Linux Desktop......Page 57 Understanding Linux Desktop Technology......Page 58 Starting with the GNOME 3 Desktop Live Image......Page 60 Navigating with the mouse......Page 61 Navigating with the keyboard......Page 66 Extending the GNOME 3 desktop......Page 67 Using GNOME shell extensions......Page 68 Managing files and folders with Nautilus......Page 69 Installing and managing additional software......Page 71 Using the Unity Graphical Shell with the GNOME Desktop......Page 73 Using the Metacity window manager......Page 74 Using the panels......Page 76 Changing panel properties......Page 77 Exercises......Page 78 Part II Becoming a Linux Power User......Page 79 Chapter 3 Using the Shell......Page 81 About Shells and Terminal Windows......Page 82 Using the shell prompt......Page 83 Using a Terminal window......Page 84 Choosing Your Shell......Page 85 Running Commands......Page 86 Understanding command syntax......Page 87 Locating commands......Page 89 Command-line editing......Page 92 Command-line completion......Page 94 Command-line recall......Page 95 Connecting and Expanding Commands......Page 97 Sequential commands......Page 98 Expanding arithmetic expressions......Page 99 Using Shell Variables......Page 100 Creating and using aliases......Page 102 Configuring your shell......Page 103 Setting your prompt......Page 104 Adding environment variables......Page 106 Getting Information about Commands......Page 107 Exercises......Page 110 Chapter 4 Moving Around the Filesystem......Page 113 Using Basic Filesystem Commands......Page 116 Using file-matching metacharacters......Page 118 Using file-redirection metacharacters......Page 120 Using brace expansion characters......Page 121 Listing Files and Directories......Page 122 Understanding File Permissions and Ownership......Page 126 Changing permissions with chmod (numbers)......Page 127 Changing permissions with chmod (letters)......Page 128 Changing file ownership......Page 129 Moving, Copying, and Removing Files......Page 130 Summary......Page 131 Exercises......Page 132 Editing Files with Vim and Vi......Page 133 Adding text......Page 135 Moving around in the text......Page 136 Deleting, copying, and changing text......Page 137 Exiting vi......Page 138 Searching for text......Page 139 Learning more about vi and vim......Page 140 Using locate to find files by name......Page 141 Searching for files with find......Page 143 Finding files by name......Page 144 Finding files by permission......Page 145 Finding files by date and time......Page 146 Using “not” and “or” when finding files......Page 147 Finding files and executing commands......Page 148 Searching in files with grep......Page 149 Exercises......Page 151 Understanding Processes......Page 153 Listing processes with ps......Page 154 Listing and changing processes with top......Page 156 Listing processes with System Monitor......Page 158 Using foreground and background commands......Page 161 Killing processes with kill and killall......Page 162 Using kill to signal processes by PID......Page 163 Setting processor priority with nice and renice......Page 164 Limiting Processes with cgroups......Page 165 Exercises......Page 167 Understanding Shell Scripts......Page 169 Executing and debugging shell scripts......Page 170 Understanding shell variables......Page 171 Special shell positional parameters......Page 172 Parameter expansion in Bash......Page 173 Performing arithmetic in shell scripts......Page 174 The “if. . .then” statements......Page 175 The case command......Page 178 The “for. . .do” loop......Page 179 The “while. . .do” and “until. . .do” loops......Page 180 Remove sections of lines of text (cut)......Page 181 The stream editor (sed)......Page 182 Telephone list......Page 183 Backup script......Page 184 Exercises......Page 185 Part III Becoming a Linux System Administrator......Page 187 Understanding System Administration......Page 189 Using Cockpit browser-based administration......Page 191 Using other browser-based admin tools......Page 193 Becoming root from the shell......Page 194 Gaining temporary admin access with sudo......Page 195 Administrative commands......Page 197 Administrative configuration files......Page 198 Using journalctl to view the systemd journal......Page 201 Managing log messages with rsyslogd......Page 202 Checking and Configuring Hardware......Page 203 Checking your hardware......Page 204 Managing removable hardware......Page 207 Listing loaded modules......Page 208 Loading modules......Page 209 Summary......Page 210 Exercises......Page 211 Chapter 9 Installing Linux......Page 213 Choosing a Computer......Page 214 Installing Ubuntu Desktop......Page 216 Installing Ubuntu Server......Page 221 Understanding Cloud-Based Installations......Page 224 Upgrading or installing from scratch......Page 225 Dual booting......Page 226 Installing Linux to run virtually......Page 227 Boot options for disabling features......Page 228 Boot options for special installation types......Page 229 Using specialized storage......Page 230 Partitioning hard drives......Page 231 Tips for creating partitions......Page 232 Using the GRUB 2 boot loader......Page 234 Exercises......Page 235 Managing Software on the Desktop......Page 237 Going Beyond the Software Window......Page 239 Understanding Linux Software Packaging......Page 240 APT basics......Page 241 Working with APT repositories......Page 245 Working with dpkg......Page 247 Exercises......Page 250 Creating User Accounts......Page 251 Adding users with adduser......Page 254 Setting user defaults......Page 256 Modifying users with usermod......Page 258 Understanding Group Accounts......Page 259 Using group accounts......Page 260 Managing Users in the Enterprise......Page 261 Setting permissions with Access Control Lists......Page 262 Setting ACLs with setfacl......Page 263 Setting default ACLs......Page 264 Enabling ACLs......Page 265 Creating group collaboration directories (set GID bit)......Page 267 Centralizing User Accounts......Page 269 Exercises......Page 270 Understanding Disk Storage......Page 273 Understanding partition tables......Page 275 Viewing disk partitions......Page 276 Creating a single-partition disk......Page 277 Creating a multiple-partition disk......Page 281 Checking an existing LVM......Page 285 Creating LVM logical volumes......Page 288 Mounting Filesystems......Page 290 Supported filesystems......Page 291 Enabling swap areas......Page 293 Using the fstab file to define mountable filesystems......Page 294 Using the mount command to mount filesystems......Page 297 Using the umount command......Page 298 Using the mkfs Command to Create a Filesystem......Page 299 Managing Storage with Cockpit......Page 300 Summary......Page 301 Exercises......Page 302 Part IV Becoming a Linux Server Administrator......Page 303 Chapter 13 Understanding Server Administration......Page 305 Step 1: Install the server......Page 306 Step 3: Start the server......Page 308 TCP Wrappers......Page 310 Configure logging......Page 311 Watch activity live with Cockpit......Page 312 Managing Remote Access with the Secure Shell Service......Page 313 Using SSH client tools......Page 314 Using ssh for remote login......Page 315 Using SSH for remote execution......Page 316 Copying files between systems with scp and rsync......Page 317 Interactive copying with sftp......Page 320 Using key-based (passwordless) authentication......Page 321 Configuring System Logging......Page 322 Understanding the rsyslog.conf file......Page 323 Setting up and using a loghost with rsyslogd......Page 325 Watching logs with logwatch......Page 326 Checking System Resources with sar......Page 327 Displaying system space with df......Page 329 Finding disk consumption with find......Page 330 Managing Servers in the Enterprise......Page 331 Exercises......Page 332 Chapter 14 Administering Networking......Page 335 Configuring Networking for Desktops......Page 336 Checking your network from NetworkManager......Page 338 Checking your network from Cockpit......Page 339 Checking your network from the command line......Page 340 Setting IP addresses manually......Page 344 Setting IP address aliases......Page 345 Setting routes......Page 346 Configuring a network proxy connection......Page 347 Configure networking with nmtui......Page 348 Editing a NetworkManager TUI connection......Page 349 Understanding networking configuration files......Page 350 Other networking files......Page 351 Setting alias network interfaces......Page 354 Setting up Ethernet channel bonding......Page 355 Setting custom routes......Page 356 Configuring Linux as a router......Page 357 Configuring Linux as a DNS server......Page 358 Summary......Page 359 Exercises......Page 360 Chapter 15 Starting and Stopping Services......Page 363 Understanding the Initialization Daemon (init or systemd)......Page 364 Understanding the classic init daemons......Page 365 Learning systemd basics......Page 371 Learning systemd’s backward compatibility to SysVinit......Page 377 Checking services for SysVinit systems......Page 379 Stopping and starting SysVinit services......Page 382 Stopping a service with systemd......Page 383 Restarting a service with systemd......Page 384 Reloading a service with systemd......Page 385 Configuring persistent services for SysVinit......Page 386 Enabling a service with systemd......Page 387 Disabling a service with systemd......Page 388 Configuring the SysVinit default runlevel......Page 389 Adding New or Customized Services......Page 390 Step 1: Create a new or customized service script file......Page 391 Step 2: Add the service script to /etc/rc.d/init.d......Page 392 Adding new services to systemd......Page 393 Step 2: Move the service configuration unit file......Page 394 Step 3: Add the service to the Wants directory......Page 395 Exercises......Page 396 Common UNIX Printing System......Page 399 Adding a printer automatically......Page 401 Using web-based CUPS administration......Page 402 Add a printer not automatically detected......Page 403 Using the Print Settings window......Page 404 Configuring local printers with the Print Settings window......Page 405 Configuring remote printers......Page 408 Adding a remote UNIX (LDP/LPR) printer......Page 409 Adding a Windows (SMB) printer......Page 410 Configuring the CUPS server (cupsd.conf)......Page 411 Starting the CUPS server......Page 412 Configuring CUPS printer options manually......Page 413 Printing with lp......Page 414 Removing print jobs with cancel......Page 415 Configuring a shared CUPS printer......Page 416 Configuring a shared Samba printer......Page 417 Setting up SMB clients......Page 418 Exercises......Page 419 Understanding the Apache Web Server......Page 421 Getting and Installing Your Apache Web Server......Page 422 Apache file permissions and ownership......Page 425 Apache and AppArmor......Page 426 Using directives......Page 429 Understanding default settings......Page 431 Adding a virtual host to Apache......Page 434 Allowing users to publish their own web content......Page 436 Securing your web traffic with TLS......Page 437 Understanding how SSL is configured......Page 438 Generating an SSL key and self-signed certificate......Page 439 Generating a certificate signing request......Page 441 Checking for configuration errors......Page 442 Access forbidden and server internal errors......Page 444 Exercises......Page 446 Understanding FTP......Page 449 Installing the vsftpd FTP Server......Page 452 Controlling the vsftpd Service......Page 453 Securing your FTP server......Page 454 Setting up user access......Page 455 Setting up vsftpd for the Internet......Page 456 Accessing an FTP server with the lftp command......Page 459 Exercises......Page 462 Understanding Samba......Page 465 Installing Samba......Page 466 Viewing Samba processes......Page 467 Configuring the [global] section......Page 471 Configuring the [printers] section......Page 473 Checking the Samba share......Page 474 Accessing Samba Shares......Page 477 Mounting a Samba share from a Linux command line......Page 478 Summary......Page 480 Exercises......Page 481 Chapter 20 Configuring an NFS File Server......Page 483 Installing an NFS Server......Page 484 Starting the NFS Service......Page 485 Configuring the /etc/exports file......Page 486 Hostnames in /etc/exports......Page 487 Access options in /etc/exports......Page 488 User mapping options in /etc/exports......Page 489 Securing Your NFS Server......Page 490 Using NFS Filesystems......Page 491 Manually mounting an NFS filesystem......Page 492 Mounting an NFS filesystem at boot time......Page 493 Using mount options......Page 494 Automounting to the /net directory......Page 496 Automounting home directories......Page 497 Unmounting NFS Filesystems......Page 499 Exercises......Page 500 Boot-Up Troubleshooting......Page 503 Understanding startup......Page 504 Starting from the firmware (BIOS or UEFI)......Page 505 Troubleshooting BIOS setup......Page 506 GRUB 2 boot loader......Page 507 Starting the kernel......Page 508 Troubleshooting the initialization system......Page 510 Troubleshooting Software Packages......Page 512 Troubleshooting outgoing connections......Page 515 Check physical connections......Page 516 Check routes......Page 517 Check hostname resolution......Page 518 Check if the client can reach your system at all......Page 519 Check if the service is available to the client......Page 520 Troubleshooting Memory......Page 521 Uncovering memory issues......Page 522 Checking for memory problems......Page 524 Dealing with memory problems......Page 525 Exercises......Page 526 Part V Learning Linux Security Techniques......Page 529 Implementing Physical Security......Page 531 Securing user accounts......Page 532 Setting expiration dates on temporary accounts......Page 533 Removing unused user accounts......Page 534 Choosing good passwords......Page 536 Setting and changing passwords......Page 537 Enforcing best password practices......Page 538 Understanding the password files and password hashes......Page 540 Managing dangerous filesystem permissions......Page 542 Securing the password files......Page 543 Locking down the filesystem......Page 544 Keeping up with security advisories......Page 545 Monitoring log files......Page 546 Detecting counterfeit accounts and privileges......Page 548 Detecting bad account passwords......Page 550 Scanning the filesystem......Page 552 Detecting viruses and rootkits......Page 554 Conducting compliance reviews......Page 557 Exercises......Page 558 Implementing Linux Security with Cryptography......Page 561 Understanding hashing......Page 562 Understanding cryptographic cipher keys......Page 563 Understanding digital signatures......Page 569 Ensuring file integrity......Page 571 Encrypting a Linux filesystem at installation......Page 572 Encrypting a Linux directory......Page 573 Encrypting Linux with miscellaneous tools......Page 576 Implementing Linux Security with PAM......Page 577 Understanding the PAM authentication process......Page 578 Understanding PAM contexts......Page 579 Understanding PAM control flags......Page 580 Understanding PAM system event configuration files......Page 581 Managing PAM-aware application configuration files......Page 582 Implementing resources limits with PAM......Page 583 Implementing time restrictions with PAM......Page 585 Enforcing good passwords with PAM......Page 586 Obtaining more information on PAM......Page 587 Exercises......Page 588 Understanding AppArmor......Page 589 Working with AppArmor......Page 592 Summary......Page 595 Exercises......Page 596 Auditing Network Services......Page 597 Evaluating access to network services with nmap......Page 599 Using nmap to audit your network services’ advertisements......Page 602 Working with Firewalls......Page 606 Understanding firewalls......Page 607 Starting with UFW......Page 608 Understanding the iptables utility......Page 610 Using the iptables utility......Page 612 Exercises......Page 619 Part VI Engaging with Cloud Computing......Page 621 Chapter 26 Shifting to Clouds and Containers......Page 623 Understanding Linux Containers......Page 624 Container registries......Page 625 Deploying LXD containers......Page 626 Deploying Docker containers......Page 629 Exercises......Page 636 Running Linux in the Cloud Using cloud-init......Page 637 Working with LXD profiles......Page 640 Working with LXD images......Page 643 Using OpenStack to deploy cloud images......Page 644 Using Amazon EC2 to Deploy Cloud Images......Page 646 Installing the AWS CLI......Page 647 Provisioning and launching an EC2 instance......Page 649 Exercises......Page 654 Chapter 28 Automating Apps and Infrastructure with Ansible......Page 655 Understanding Ansible......Page 656 Inventories......Page 657 Modules......Page 658 Stepping Through an Ansible Deployment......Page 659 Setting up SSH keys to each node......Page 660 Authenticating to the hosts......Page 662 Creating a playbook......Page 663 Run the playbook......Page 664 Trying ad-hoc commands......Page 665 Exercises......Page 667 Chapter 29 Deploying Applications as Containers with Kubernetes......Page 669 Kubernetes masters......Page 670 Kubernetes applications......Page 671 Trying Kubernetes......Page 672 Getting Kubernetes up and running......Page 673 Deploying a Kubernetes application......Page 674 Getting information on the deployment’s pods......Page 675 Exposing applications with services......Page 679 Scaling up an application......Page 680 Checking the load balancer......Page 681 Deleting a service......Page 682 Exercises......Page 683 Appendix: Exercise Answers......Page 685 Index......Page 737 EULA......Page 755

Similar books