ENGLISH

Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04, 13th Ed

Book information

Publisher
SAMS / Pearson Education
Year
2019
ISBN
013498546X, 9780134985466
Language
english
Format
PDF
Filesize
8 MB (8492933 bytes)
Pages
868\868
Topic
Computers\\Operating Systems
Time added
2019-05-23 03:28:17

Description

Ubuntu Unleashed 2019 Edition is filled with unique and advanced information for everyone who wants to make the most of the Ubuntu Linux operating system. This new edition has been thoroughly updated, including two new chapters, by a long-time Ubuntu community leader to reflect the exciting new Ubuntu 18.04 LTS release, with forthcoming online updates for 18.10, 19.04, and 19.10 when they are released. Linux writer Matthew Helmke covers all you need to know about Ubuntu 18.04 LTS installation, configuration, productivity, multimedia, development, system administration, server operations, networking, virtualization, security, DevOps, and more—including intermediate-to-advanced techniques you won’t find in any other book. Helmke presents up-to-the-minute introductions to Ubuntu’s key productivity and web development tools, programming languages, hardware support, and more. You’ll find new or improved coverage of the Ubuntu desktop experience, common web servers and software stacks, containers like Docker and Kubernetes, as well as a wealth of systems administration information that is stable and valuable over many years. Configure and use the Ubuntu desktop Get started with multimedia and productivity applications, including LibreOffice Manage Linux services, users, and software packages Administer and run Ubuntu from the command line Automate tasks and use shell scripting Provide secure remote access and configure a secure VPN Manage kernels and modules Administer file, print, email, proxy, LDAP, DNS, and HTTP servers (Apache, Nginx, or alternatives) Learn about new options for managing large numbers of servers Work with databases (both SQL and the newest NoSQL alternatives) Get started with virtualization and cloud deployment, including information about containers Learn the basics about popular programming languages including Python, PHP, Perl, and gain an introduction to new alternatives such as Go and Rust Cover......Page 1 Title Page......Page 2 Copyright Page......Page 3 Contents......Page 6 About the Author......Page 29 Dedication......Page 30 Introduction......Page 32 Licensing......Page 33 Those Wanting to Become Intermediate or Advanced Users......Page 34 Sysadmins, Programmers, and DevOps......Page 35 What This Book Contains......Page 36 Conventions Used in This Book......Page 37 Before You Begin the Installation......Page 40 Installation Options......Page 41 32-Bit Versus 64-Bit Ubuntu......Page 43 The Boot Loader......Page 44 Step-by-Step Installation......Page 45 Installing......Page 46 Shutting Down......Page 50 Software Updater......Page 51 The sudo Command......Page 53 Configuring Software Repositories......Page 54 Detecting and Configuring a Printer......Page 57 Setting the Time and Date......Page 58 Configuring Wireless Networks......Page 59 Troubleshooting Post-Installation Configuration Problems......Page 60 References......Page 61 What Is Linux?......Page 62 Why Use Linux?......Page 64 Ubuntu for Business......Page 66 Getting the Most from Ubuntu and Linux Documentation......Page 68 Ubuntu Developers and Documentation......Page 69 Google Is Your Friend......Page 70 Commercial Support......Page 71 Linux Guides and Books......Page 72 Mailing Lists......Page 73 Ubuntu Project Mailing Lists......Page 74 Internet Relay Chat......Page 75 Foundations and the X Server......Page 76 Basic X Concepts......Page 77 Using X......Page 78 Elements of the xorg.conf File......Page 79 Using a Display Manager......Page 84 Using GNOME: A Primer......Page 85 References......Page 88 Getting Started with Firefox......Page 90 Checking Out Google Chrome and Chromium......Page 92 Choosing an Email Client......Page 93 Evolution......Page 94 Internet Relay Chat......Page 96 Usenet Newsgroups......Page 98 References......Page 100 5 Productivity Applications......Page 102 Introducing LibreOffice......Page 103 Working with PDFs......Page 105 Working with XML and DocBook......Page 106 Productivity Applications Written for Microsoft Windows......Page 107 References......Page 108 Sound and Music......Page 110 Sound Cards......Page 111 Adjusting Volume......Page 112 Sound Formats......Page 113 Listening to Music......Page 114 The GNU Image Manipulation Program......Page 115 Working with Graphics Formats......Page 116 Other Graphics Manipulation Options......Page 118 Burning CDs and DVDs in Ubuntu......Page 119 Creating CDs from the Command Line......Page 120 Creating DVDs from the Command Line......Page 122 TV and Video Hardware......Page 124 Viewing Video in Linux......Page 125 Video Editing......Page 126 References......Page 127 Desktop Environment......Page 128 KDE and Kubuntu......Page 129 Xfce and Xubuntu......Page 131 LXDE and Lubuntu......Page 132 Ubuntu Budgie......Page 133 References......Page 134 Ubuntu Gaming......Page 136 Installing Proprietary Video Drivers......Page 137 Steam......Page 138 Warsow......Page 139 Scorched 3D......Page 140 SuperTux......Page 141 Battle for Wesnoth......Page 142 FlightGear......Page 143 Commercial Games......Page 144 References......Page 145 Ubuntu Software......Page 148 Using Synaptic for Software Management......Page 149 Staying Up-to-Date......Page 152 Day-to-Day APT Usage......Page 153 Finding Software......Page 156 Using apt Instead of apt-get......Page 157 Compiling from a Tarball......Page 158 Compiling from Source from the Ubuntu Repositories......Page 159 Ubuntu Core......Page 160 References......Page 161 10 Command-Line Beginner’s Class......Page 162 What Is the Command Line?......Page 163 Accessing the Command Line......Page 164 Text-Based Console Login......Page 165 Logging In and Out from a Remote Computer......Page 166 User Accounts......Page 167 Reading Documentation......Page 168 Using apropros......Page 169 Understanding the Linux File System Hierarchy......Page 170 Configuration Files in /etc......Page 171 Using the Contents of the /proc Directory to Interact with the Kernel......Page 172 Accessing Variable Data Files in the /var Directory......Page 174 Listing the Contents of a Directory with ls......Page 175 Changing Directories with cd......Page 177 Working with Permissions......Page 178 Assigning Permissions......Page 179 Altering File Permissions with chmod......Page 180 Changing File Permissions with chown......Page 182 Understanding Set User ID, Set Group ID, and Sticky Bit Permissions......Page 183 Setting Permissions with Access Control Lists......Page 184 Creating a File with touch......Page 185 Creating a Directory with mkdir......Page 186 Deleting a File or Directory with rm......Page 187 Moving or Renaming a File with mv......Page 188 Displaying the Contents of a File with less......Page 189 Working as Root......Page 190 Understanding and Fixing sudo......Page 191 Creating Users......Page 193 Shutting Down the System......Page 194 Commonly Used Commands and Programs......Page 196 References......Page 197 11 Command-Line Master Class, Part 1......Page 198 Why Use the Command Line?......Page 199 Using Basic Commands......Page 200 Printing the Contents of a File with cat......Page 201 Changing Directories with cd......Page 202 Copying Files with cp......Page 204 Printing Disk Usage with du......Page 205 Finding Files by Searching with find......Page 206 Searches for a String in Input with grep......Page 209 Paging Through Output with less......Page 210 Creating Links Between Files with ln......Page 212 Finding Files from an Index with locate......Page 213 Listing Files in the Current Directory with ls......Page 214 Listing System Information with lsblk, lshw, lsmod, lspci, and neofetch......Page 215 Reading Manual Pages with man......Page 216 Moving Files with mv......Page 217 Deleting Files and Directories with rm......Page 218 Sorting the Contents of a File with sort......Page 219 Printing the Last Lines of a File with tail......Page 220 References......Page 221 Redirecting Output and Input......Page 222 stdin, stdout, stderr, and Redirection......Page 224 Finding Similarities in Files with comm......Page 225 Listing Processes with ps......Page 226 Running One or More Tasks in the Background......Page 228 Moving Jobs to the Background or Foreground with bg and fg......Page 229 Printing Resource Usage with top......Page 230 Setting Process Priority with nice......Page 232 Pipes......Page 233 Combining Commands with Boolean Operators......Page 235 Executing Jobs in Parallel......Page 236 Using Environment Variables......Page 237 Using Common Text Editors......Page 240 Working with nano......Page 241 Working with vi......Page 242 Working with emacs......Page 243 Working with sed and awk......Page 244 Working with Compressed Files......Page 246 Using Multiple Terminals with byobu......Page 247 Doing a Polite System Reset Using REISUB......Page 249 Reinstalling GRUB......Page 250 Tips and Tricks......Page 251 Running the Same Thing You Just Ran with a Different First Word......Page 252 Confining a Script to a Directory......Page 253 Using Coreutils......Page 254 References......Page 255 User Accounts......Page 256 The Super User/Root User......Page 257 File Permissions......Page 259 Group Listing......Page 260 Group Management Tools......Page 261 Managing Users......Page 262 User Management Tools......Page 263 Adding New Users......Page 264 Monitoring User Activity on the System......Page 267 The Password File......Page 268 Shadow Passwords......Page 270 Changing Passwords in a Batch......Page 272 Temporarily Changing User Identity with the su Command......Page 273 Granting Root Privileges on Occasion: The sudo Command......Page 275 Disk Quotas......Page 278 Manually Configuring Quotas......Page 279 Related Ubuntu Commands......Page 280 References......Page 281 Using at and batch to Schedule Tasks for Later......Page 282 Using cron to Run Jobs Repeatedly......Page 285 Using rtcwake to Wake Your Computer from Sleep Automatically......Page 287 Basic Shell Control......Page 289 The Shell Command Line......Page 290 Shell Pattern-Matching Support......Page 291 Redirecting Input and Output......Page 292 Background Processing......Page 293 Writing and Executing a Shell Script......Page 294 Running the New Shell Program......Page 295 Storing Shell Scripts for System-wide Access......Page 296 Interpreting Shell Scripts Through Specific Shells......Page 297 Assigning a Value to a Variable......Page 298 A Simple Example of a Positional Parameter......Page 299 Using Positional Parameters to Access and Retrieve Variables from the Command Line......Page 300 Using a Simple Script to Automate Tasks......Page 301 Special Characters......Page 303 Comparison of Expressions in pdksh and bash......Page 306 Comparing Expressions with tcsh......Page 312 The for Statement......Page 316 The while Statement......Page 317 The until Statement......Page 319 The select Statement (pdksh)......Page 320 The if Statement......Page 321 The expr Statement......Page 322 The case Statement......Page 323 Using Functions in Shell Scripts......Page 325 References......Page 326 Running Services at Boot......Page 328 Beginning the Boot Loading Process......Page 329 Loading the Linux Kernel......Page 331 Runlevel Definitions......Page 332 Understanding init Scripts and the Final Stage of Initialization......Page 333 Controlling Services at Boot with Administrative Tools......Page 334 Starting and Stopping Services Manually......Page 335 Using Upstart......Page 336 Using systemd......Page 337 References......Page 338 Console-Based Monitoring......Page 340 Using the kill Command to Control Processes......Page 342 Using Priority Scheduling and Control......Page 344 Disk Space......Page 345 Checking Log Files......Page 346 Rotating Log Files......Page 348 Conky......Page 351 Enterprise Server Monitoring......Page 357 References......Page 358 Choosing a Backup Strategy......Page 360 Why Data Loss Occurs......Page 361 Assessing Your Backup Needs and Resources......Page 362 Evaluating Backup Strategies......Page 364 Removable Storage Media......Page 367 Tape Drive Backups......Page 368 Using Backup Software......Page 369 tar: The Most Basic Backup Tool......Page 370 The KDE ark Archiving Tool......Page 372 Déjà Dup......Page 373 Back In Time......Page 374 Amanda......Page 375 Alternative Backup Software......Page 376 Copying Files Using tar......Page 377 Copying Files Using cp......Page 378 Using rsync......Page 379 Version Control for Configuration Files......Page 381 System Rescue......Page 383 Restoring the GRUB2 Boot Loader......Page 384 References......Page 385 18 Networking......Page 386 Checking for the Availability of the Loopback Interface......Page 387 Configuring the Loopback Interface Manually......Page 388 Checking Connections with ping, traceroute, and mtr......Page 389 Networking with TCP/IP......Page 391 TCP/IP Addressing......Page 392 Using IP Masquerading in Ubuntu......Page 394 IPv6 Basics......Page 395 Subnetting......Page 398 Broadcast, Unicast, and Multicast Addressing......Page 399 Network Interface Cards......Page 400 Network Cable......Page 402 Hubs and Switches......Page 403 Initializing New Network Hardware......Page 404 Using Network Configuration Tools......Page 406 Command-Line Network Interface Configuration......Page 407 Network Configuration Files......Page 411 Dynamic Host Configuration Protocol......Page 414 How DHCP Works......Page 415 DHCP Software Installation and Configuration......Page 416 Using DHCP to Configure Network Hosts......Page 418 Wireless Networking......Page 420 Support for Wireless Networking in Ubuntu......Page 421 Beyond the Network and onto the Internet......Page 422 Common Configuration Information......Page 423 Configuring Digital Subscriber Line Access......Page 424 Configuring a PPPoE Connection Manually......Page 425 Configuring Dial-up Internet Access......Page 427 Troubleshooting Connection Problems......Page 428 References......Page 429 Setting Up a Telnet Server......Page 430 SSH Tools......Page 432 Using scp to Copy Individual Files Between Machines......Page 433 Using ssh-keygen to Enable Key-Based Logins......Page 434 Virtual Network Computing......Page 436 References......Page 438 Understanding Computer Attacks......Page 440 Assessing Your Vulnerability......Page 442 Securing a Wireless Network......Page 443 Passwords and Physical Security......Page 444 Configuring and Using Tripwire......Page 445 Configuring Your Firewall......Page 446 AppArmor......Page 449 Forming a Disaster Recovery Plan......Page 451 References......Page 452 Storage Disk......Page 454 Using the BIOS and Kernel to Tune the Disk Drives......Page 455 The hdparm Command......Page 456 File System Tuning......Page 457 The e2fsck Command......Page 458 Kernel......Page 459 Apache......Page 460 Measuring Key Buffer Usage......Page 462 Using the Query Cache......Page 463 Query Optimization......Page 465 References......Page 466 22 Kernel and Module Management......Page 468 The Linux Kernel......Page 469 The Linux Source Tree......Page 470 Types of Kernels......Page 472 Managing Modules......Page 473 When to Recompile......Page 475 Kernel Versions......Page 476 Patching the Kernel......Page 477 Compiling the Kernel......Page 479 Using xconfig to Configure the Kernel......Page 482 Errors During Compile......Page 485 References......Page 486 23 Sharing Files and Printers......Page 488 NFS Server Configuration......Page 489 NFS Client Configuration......Page 490 Putting Samba to Work......Page 491 Manually Configuring Samba with /etc/samba/smb.conf......Page 493 Starting, Stopping, and Restarting the smbd Daemon......Page 496 Mounting Samba Shares......Page 497 Creating Network Printers......Page 498 Using the CUPS GUI......Page 500 Avoiding Printer Support Problems......Page 501 References......Page 502 LAMP......Page 504 MEAN......Page 506 References......Page 508 About the Apache Web Server......Page 510 Installing the Apache Server......Page 511 Starting and Stopping Apache......Page 512 Runtime Configuration Directives......Page 513 Editing apache2.conf......Page 514 Apache Multiprocessing Modules......Page 516 Using .htaccess Configuration Files......Page 517 Restricting Access with Require......Page 519 Authentication......Page 520 Apache Modules......Page 522 mod_asis......Page 523 mod_auth_digest......Page 524 mod_include......Page 525 mod_setenvif......Page 526 mod_vhost_alias......Page 527 Name-Based Virtual Hosts......Page 528 Logging......Page 529 HTTPS......Page 531 References......Page 533 About the Nginx Web Server......Page 534 Building the Source Yourself......Page 536 Configuring the Nginx Server......Page 537 Virtual Hosting......Page 540 Setting Up PHP......Page 541 Adding and Configuring Modules......Page 542 HTTPS......Page 543 Reference......Page 544 lighttpd......Page 546 Cherokee......Page 547 thttpd......Page 548 References......Page 549 28 Administering Relational Database Services......Page 550 A Brief Review of Database Basics......Page 551 How Relational Databases Work......Page 553 Creating Tables......Page 555 Inserting Data into Tables......Page 556 Retrieving Data from a Database......Page 557 Data Locking......Page 559 ACID Compliance in Transaction Processing to Protect Data Integrity......Page 560 Configuring MySQL......Page 561 Setting a Password for the MySQL Root User......Page 562 Creating a Database in MySQL......Page 563 Initializing the Data Directory in PostgreSQL......Page 565 Creating Database Users in PostgreSQL......Page 566 Deleting Database Users in PostgreSQL......Page 567 Database Clients......Page 568 SSH Access to a Database......Page 569 Local GUI Client Access to a Database......Page 570 Web Access to a Database......Page 571 The MySQL Command-Line Client......Page 572 The PostgreSQL Command-Line Client......Page 573 References......Page 574 29 NoSQL Databases......Page 576 Berkeley DB......Page 579 Memcached and MemcacheDB......Page 580 Document Stores......Page 581 CouchDB......Page 582 MongoDB......Page 583 BigTable......Page 584 Neo4j......Page 585 References......Page 586 30 Virtualization on Ubuntu......Page 588 KVM......Page 590 VirtualBox......Page 593 Xen......Page 595 References......Page 596 31 Ubuntu in the Cloud......Page 598 Why a Cloud?......Page 599 Metal as a Service (MaaS)......Page 600 Deploy/Install Basics: Public, Private, or Hybrid?......Page 601 Compute Infrastructure: Nova......Page 602 Imaging Service: Glance......Page 603 Juju......Page 604 Landscape......Page 605 References......Page 606 32 Containers and Ubuntu......Page 608 LXC and LXD......Page 609 Kubernetes......Page 610 References......Page 611 Juju......Page 612 CFEngine......Page 613 References......Page 614 Choosing an FTP Server......Page 616 Ubuntu FTP Server Packages......Page 617 The FTP User......Page 618 Configuring the Very Secure FTP Server......Page 620 Other vsftpd Server Configuration Files......Page 621 Using the ftphosts File to Allow or Deny FTP Server Connection......Page 623 References......Page 624 How Email Is Sent and Received......Page 626 The Mail Transport Agent......Page 627 The Mail Delivery Agent......Page 629 Basic Postfix Configuration and Operation......Page 630 Using Smart Hosts......Page 633 Mail Relaying......Page 634 Forwarding Email with Aliases......Page 635 Configuring Fetchmail......Page 636 Choosing a Mail Delivery Agent......Page 639 Squirrelmail......Page 640 References......Page 641 What Is a Proxy Server?......Page 642 Configuring Clients......Page 643 Access Control Lists......Page 644 Specifying Client IP Addresses......Page 648 Sample Configurations......Page 649 Virtual Private Networks (VPNs)......Page 651 Setting Up a VPN Client......Page 653 Setting Up a VPN Server......Page 654 References......Page 656 37 Lightweight Directory Access Protocol (LDAP)......Page 658 Creating Your Schema......Page 659 Populating Your Directory......Page 661 LDAP Administration......Page 663 References......Page 664 38 Linux Terminal Server Project (LTSP)......Page 666 LTSP Requirements......Page 667 Using LTSP......Page 670 References......Page 671 39 Name Serving with the Domain Name System (DNS)......Page 672 Understanding Domain Names......Page 673 DNS Servers......Page 674 DNS Records......Page 675 Setting Up a DNS Server with BIND......Page 678 References......Page 680 40 Using Programming Tools for Ubuntu......Page 682 Programming in C with Linux......Page 683 Building Programs with make......Page 684 Using the autoconf Utility to Configure Code......Page 686 Debugging Tools......Page 687 Using the GNU C Compiler......Page 688 Using the KDevelop Client......Page 689 The Glade Client for Developing in GNOME......Page 690 IDEs and SDKs......Page 691 References......Page 693 41 Using Ubuntu for Opportunistic Software Development......Page 694 Managing Software Projects with Git......Page 695 Managing Software Projects with Bazaar......Page 696 Managing Software Projects with Subversion......Page 697 Managing Software Projects with Mercurial......Page 698 Introduction to Opportunistic Development......Page 699 Launchpad......Page 700 Bikeshed and Other Tools......Page 702 References......Page 705 42 Helping with Ubuntu Development......Page 706 Introduction to Ubuntu Development......Page 707 Install Basic Packages and Configure......Page 708 Setting Up Your Environment to Work with Launchpad......Page 709 Fixing Bugs and Packaging......Page 711 Masters of the Universe......Page 714 References......Page 715 Community Teams......Page 716 Ubuntu QA Team......Page 717 References......Page 718 44 Using Popular Programming Languages......Page 720 Clojure......Page 721 COBOL......Page 722 Dart......Page 723 Forth......Page 724 Go......Page 725 Java......Page 726 Lisp......Page 727 OCaml......Page 728 Python......Page 729 Scala......Page 730 References......Page 731 45 Beginning Mobile Development for Android......Page 734 Android Runtime......Page 735 Installing SDK Packages......Page 736 Creating Your First Application......Page 738 References......Page 739 Index......Page 740 A......Page 741 B......Page 744 C......Page 745 D......Page 754 E......Page 757 F......Page 759 G......Page 761 H......Page 763 I......Page 764 J......Page 765 K......Page 766 L......Page 767 M......Page 769 N......Page 772 P......Page 774 R......Page 778 S......Page 781 T......Page 789 U......Page 790 V......Page 792 W......Page 794 X-Y-Z......Page 795 Using Perl with Linux......Page 796 A Simple Perl Program......Page 797 Perl Variable Types......Page 799 Special Variables......Page 800 Comparison Operators......Page 801 Other Operators......Page 802 Conditional Statements: if/else and unless......Page 803 unless......Page 804 foreach......Page 805 last and next......Page 806 Regular Expressions......Page 807 Access to the Shell......Page 808 Modules and CPAN......Page 809 Sending Mail......Page 810 Purging Logs......Page 812 One-Liners......Page 813 Command-Line Processing......Page 814 References......Page 815 Introduction to PHP......Page 816 Variables......Page 817 Arrays......Page 819 Constants......Page 820 Comments......Page 821 Escape Sequences......Page 822 Operators......Page 823 Conditional Statements......Page 825 Special Operators......Page 827 Switching......Page 828 Loops......Page 829 Including Other Files......Page 831 Strings......Page 832 Arrays......Page 835 Files......Page 837 Miscellaneous......Page 839 Databases......Page 843 References......Page 846 48 Using Python......Page 848 Python on Linux......Page 849 Numbers......Page 850 More on Strings......Page 852 Lists......Page 855 Dictionaries......Page 857 Conditionals and Looping......Page 858 Functions......Page 860 Object Orientation......Page 861 Class and Object Variables......Page 862 Constructors and Destructors......Page 863 Class Inheritance......Page 864 The Standard Library and the Python Package Index......Page 865 References......Page 866

Similar books