Introduction xxxiPART I: GETTING STARTEDChapter 1 Installing Ubuntu and Post-Installation Configuration 1Before You Begin the Installation 1 Researching Your Hardware Specifications 2 Installation Options 2 32-Bit Versus 64-Bit Ubuntu 4 Planning Partition Strategies 5 The Boot Loader 5 Installing from DVD or USB Drive 6Step-by-Step Installation 6 Installing 7 First Update 11Shutting Down 11Finding Programs and Files 12Software Updater 12The sudo Command 14Configuring Software Repositories 15System Settings 17 Detecting and Configuring a Printer 18 Configuring Power Management in Ubuntu 18 Setting the Time and Date 19Configuring Wireless Networks 20Troubleshooting Post-Installation Configuration Problems 21Chapter 2 Background Information and Resources 23What Is Linux? 23Why Use Linux? 25What Is Ubuntu? 27Ubuntu for Business 27Ubuntu in Your Home 28Getting the Most from Linux and Ubuntu Documentation 28 Linux 29 Ubuntu 30PART II: DESKTOP UBUNTUChapter 3 Foundations of the Linux GUI 31Foundations and the X Server 31 Basic X Concepts 32 Using X 33 Elements of the xorg conf File 34Starting X 39 Using a Display Manager 39 Changing Window Managers 39Chapter 4 Ubuntu Desktop Options 41Desktop Environment 41Using GNOME: A Primer 42KDE and Kubuntu 45Xfce and Xubuntu 46LXDE and Lubuntu 47MATE and Ubuntu MATE 48Ubuntu Budgie 49Ubuntu Kylin 50Chapter 5 On the Internet 51Getting Started with Firefox 52Checking Out Google Chrome and Chromium 53Chapter 6 Productivity Applications 55Introducing LibreOffice 56Other Useful Productivity Software 58 Working with PDFs 58 Writing Scripts 59 Working with XML and DocBook 59 Working with LaTeX 60 Creating Mind Maps 61Productivity Applications Written for Microsoft Windows 61Chapter 7 Multimedia Applications 63Sound and Music 63 Sound Cards 64 Sound Formats 65 Listening to Music 65Graphics Manipulation 66 The GNU Image Manipulation Program 66 Using Scanners in Ubuntu 67 Working with Graphics Formats 67 Capturing Screen Images 69 Other Graphics Manipulation Options 70Using Digital Cameras with Ubuntu 70 Handheld Digital Cameras 70 Using Shotwell Photo Manager 71Burning CDs and DVDs in Ubuntu 71 Creating CDs and DVDs with Brasero 71 Creating CDs from the Command Line 72 Creating DVDs from the Command Line 73Viewing Video 75 Video Formats 75 Viewing Video in Linux 76Recording and Editing Audio 76Editing Video 77Chapter 8 Games 79Ubuntu Gaming 79Installing Proprietary Video Drivers 80Online Game Sources 81 Steam 81 GOG com 82 Humble 82 itch io 82 LGDB 82 Game Jolt 82Installing Games from the Ubuntu Repositories 82 Warsow 82 Scorched 3D 83 Frozen Bubble 84 SuperTux 84 Battle for Wesnoth 85 Frets on Fire 85 FlightGear 87 Speed Dreams 87 Games for Kids 88 Commercial Games 88Playing Windows Games 88PART III: SYSTEM ADMINISTRATIONChapter 9 Managing Software 91Ubuntu Software 91Using Synaptic for Software Management 92Staying Up to Date 94Working on the Command Line 95 Day-to-Day APT Usage 95 Finding Software 98 Using apt-get Instead of apt 99Compiling Software from Source 100 Compiling from a Tarball 100 Compiling from Source from the Ubuntu Repositories 101Configuration Management 102 dotdee 102 Ubuntu Core 103Using the Snappy Package Manager 103Chapter 10 Command-Line Beginners Class 105What Is the Command Line? 106Accessing the Command Line 107 Text-Based Console Login 107 Logging Out 108 Logging In and Out from a Remote Computer 108User Accounts 109Reading Documentation 111 Using Man Pages 111 Using apropros 112 Using whereis 112Understanding the Linux File System Hierarchy 112 Essential Commands in /bin and /sbin 114 Configuration Files in /etc 114 User Directories: /home 115 Using the Contents of the /proc Directory to Interact with or Obtain Information from the Kernel 115 Working with Shared Data in the /usr Directory 117 Temporary File Storage in the /tmp Directory 117 Accessing Variable Data Files in the /var Directory 117Navigating the Linux File System 117 Listing the Contents of a Directory with ls 118 Changing Directories with cd 120 Finding Your Current Directory with pwd 120Working with Permissions 120 Assigning Permissions 121 Directory Permissions 122 Altering File Permissions with chmod 123 File Permissions with umask 124 File Permissions with chgrp 125 Changing File Permissions with chown 125 Understanding Set User ID, Set Group ID, and Sticky Bit Permissions 125 Setting Permissions with Access Control Lists 127Working with Files 128 Creating a File with touch 128 Creating a Directory with mkdir 129 Deleting a Directory with rmdir 129 Deleting a File or Directory with rm 130 Moving or Renaming a File with mv 131 Copying a File with cp 131 Displaying the Contents of a File with cat 132 Displaying the Contents of a File with less 132 Using Wildcards and Regular Expressions 133Working as Root 133 Understanding and Fixing sudo 134 Creating Users 136 Deleting Users 137 Shutting Down the System 137 Rebooting the System 138Commonly Used Commands and Programs 139Chapter 11 Command-Line Master Class, Part 1 141Why Use the Command Line? 142Using Basic Commands 143 Printing the Contents of a File with cat 144 Changing Directories with cd 145 Changing File Access Permissions with chmod 147 Copying Files with cp 147 Printing Disk Usage with du 148 Using echo 148 Finding Files by Searching with find 149 Searches for a String in Input with grep 151 Paging Through Output with less 152 Creating Links Between Files with ln 154 Finding Files from an Index with locate 156 Listing Files in the Current Directory with ls 156 Listing System Information with lsblk, lshw, lsmod, lspci, and neofetch 158 Reading Manual Pages with man 159 Making Directories with mkdir 160 Moving Files with mv 161 Renaming Files with rename 161 Deleting Files and Directories with rm 161 Sorting the Contents of a File with sort 162 Printing the Last Lines of a File with tail 163 Printing the Location of a Command with which 164 Downloading Files with wget 164Chapter 12 Command-Line Master Class, Part 2 167Redirecting Output and Input 167stdin, stdout, stderr, and Redirection 169Comparing Files 170 Finding Differences in Files with diff 170 Finding Similarities in Files with comm 170Limiting Resource Use and Job Control 171 Listing Processes with ps 171 Listing Jobs with jobs 173 Running One or More Tasks in the Background 173 Moving Jobs to the Background or Foreground with bg and fg 174 Printing Resource Usage with top 175 Setting Process Priority with nice 177Combining Commands 178 Pipes 178 Combining Commands with Boolean Operators 180 Running Separate Commands in Sequence 180 Process Substitution 181Executing Jobs in Parallel 181Using Environment Variables 182Using Common Text Editors 185 Working with nano 186 Working with vi 187 Working with emacs 188 Working with sed and awk 189Working with Compressed Files 191Using Multiple Terminals with byobu192Doing a Polite System Reset Using REISUB 194Fixing an Ubuntu System That Will Not Boot 195 Checking BIOS 195 Checking GRUB 195 Reinstalling GRUB 195 Using Recovery Mode 196 Reinstalling Ubuntu 196Tips and Tricks 196 Running the Previous Command 196 Running Any Previous Command 197 Running a Previous Command That Started with Specific Letters 197 Running the Same Thing You Just Ran with a Different First Word 197 Viewing Your History and More 197 Doing Two or More Things 198 Using Shortcuts 198 Confining a Script to a Directory 198 Using Coreutils 199 Reading the Contents of the Kernel Ring Buffer with dmesg 200Chapter 13 Managing Users 201User Accounts 201 The Super User/Root User 202 User IDs and Group IDs 204 File Permissions 204Managing Groups 205 Group Listing 205 Group Management Tools 206Managing Users 207 User Management Tools 208 Adding New Users 209 Monitoring User Activity on the System 211Managing Passwords 212 System Password Policy 212 The Password File 212 Shadow Passwords 214 Managing Password Security for Users 216 Changing Passwords in a Batch 216Granting System Administrator Privileges to Regular Users 217 Temporarily Changing User Identity with the su Command 217 Granting Root Privileges on Occasion: The sudo Command 219Disk Quotas 222 Implementing Quotas 222 Manually Configuring Quotas 223Related Ubuntu Commands 223Chapter 14 Automating Tasks and Shell Scripting 225What Is a Shell? 225Scheduling Tasks 226 Using at and batch to Schedule Tasks for Later 227 Using cron to Run Jobs Repeatedly 229 Using rtcwake to Wake Your Computer from Sleep Automatically 231Basic Shell Control 233 The Shell Command Line 233 Shell Pattern-Matching Support 235 Redirecting Input and Output 236 Piping Data 237 Background Processing 237Writing and Executing a Shell Script 237 Running the New Shell Program 239 Storing Shell Scripts for System-wide Access 240 Interpreting Shell Scripts Through Specific Shells 240 Using Variables in Shell Scripts 242 Assigning a Value to a Variable 242 Accessing Variable Values 243 Positional Parameters 243 A Simple Example of a Positional Parameter 243 Using Positional Parameters to Access and Retrieve Variables from the Command Line 244 Using a Simple Script to Automate Tasks 244 Built-in Variables 246 Special Characters 247 Comparison of Expressions in pdksh and bash 250 Comparing Expressions with tcsh 255 The for Statement 259 The while Statement 261 The until Statement 263 The repeat Statement (tcsh) 263 The select Statement (pdksh) 264 The shift Statement 264 The if Statement 265 The expr Statement 266 The case Statement 267 The break and exit Statements 269 Using Functions in Shell Scripts 269Chapter 15 The Boot Process 271Running Services at Boot 271Beginning the Boot Loading Process 272Loading the Linux Kernel 274Starting and Stopping Services with systemd 275 Controlling Services at Boot with Administrative Tools 278 Troubleshooting Runlevel Problems 278Boot-Repair 278Chapter 16 System-Monitoring Tools 281Console-Based Monitoring 281 Using the kill Command to Control Processes 283 Using Priority Scheduling and Control 285 Displaying Free and Used Memory with free 286 Disk Space 286 Disk Quotas 287 Checking Log Files 287 Rotating Log Files 289Graphical Process- and System-Management Tools 292 System Monitor 292 Conky 292 Other Graphical Process- and System-Monitoring Tools 297KDE Process- and System-Monitoring Tools 298Enterprise Server Monitoring 298Chapter 17 Backing Up 301Choosing a Backup Strategy 301 Why Data Loss Occurs 302 Assessing Your Backup Needs and Resources 303 Evaluating Backup Strategies 304 Making the Choice 308Choosing Backup Hardware and Media 308 External Hard Drive 308 Network Storage 308 Tape Drive Backups 309 Cloud Storage 309Using Backup Software 309 tar: The Most Basic Backup Tool 310 The GNOME File Roller 312 The KDE ark Archiving Tool 312 Déjà Dup 313 Back In Time 314 Unison 315 Amanda 315 Alternative Backup Software 316Copying Files 316 Copying Files Using tar 317 Compressing, Encrypting, and Sending tar Streams 318 Copying Files Using cp 318 Using rsync 319Version Control for Configuration Files 320System Rescue 323 The Ubuntu Rescue Disc 323 Restoring the GRUB2 Boot Loader 323 Saving Files from a Nonbooting Hard Drive 324Chapter 18 Networking 325Laying the Foundation: The localhost Interface 326 Checking for the Availability of the Loopback Interface 326 Configuring the Loopback Interface Manually 327Checking Connections with ping, traceroute, and mtr 328Networking with TCP/IP 330 TCP/IP Addressing 331 Using IP Masquerading in Ubuntu 332 Ports 333IPv6 Basics 334Network Organization 337 Subnetting 337 Subnet Masks 337 Broadcast, Unicast, and Multicast Addressing 338Hardware Devices for Networking 338 Network Interface Cards 338 Network Cable 340 Hubs and Switches 342 Routers and Bridges 343 Initializing New Network Hardware 343Using Network Configuration Tools 345 Command-Line Network Interface Configuration 346 Network Configuration Files 350 Using Graphical Configuration Tools 355Dynamic Host Configuration Protocol 355 How DHCP Works 356 Activating DHCP at Installation and Boot Time 357 DHCP Software Installation and Configuration 358 Using DHCP to Configure Network Hosts 359 Other Uses for DHCP 361Wireless Networking 361 Support for Wireless Networking in Ubuntu 361 Choosing from Among Available Wireless Protocols 363Beyond the Network and onto the Internet 363Common Configuration Information 364 Configuring Digital Subscriber Line Access 365 Understanding PPP over Ethernet 366 Configuring a PPPoE Connection Manually 366 Configuring Dial-up Internet Access 367 Troubleshooting Connection Problems 368Chapter 19 Remote Access with SSH and VNC 371Setting Up an SSH Server 371SSH Tools 372 Using scp to Copy Individual Files Between Machines 372 Using sftp to Copy Many Files Between Machines 373 Using ssh-keygen to Enable Key-Based Logins 373Virtual Network Computing 375Guacamole 377Chapter 20 Securing Your Machines 379Understanding Computer Attacks 379Assessing Your Vulnerability 381Protecting Your Machine 382 Securing a Wireless Network 382 Passwords and Physical Security 383 Configuring and Using Tripwire 384 Securing Devices 385Viruses 385Configuring Your Firewall 386AppArmor 388Forming a Disaster Recovery Plan 390Chapter 21 Performance Tuning 393Storage Disk 394 Linux File Systems 394 The hdparm Command 395 File System Tuning 396 The tune2fs Command 396 The e2fsck Command 397 The badblocks Command 397 Disabling File Access Time 397Kernel 398Tuned 399Chapter 22 Kernel and Module Management 401The Linux Kernel 402 The Linux Source Tree 403 Types of Kernels 405Managing Modules 406When to Recompile 408Kernel Versions 409Obtaining the Kernel Sources 409Patching the Kernel 410Compiling the Kernel 412 Using xconfig to Configure the Kernel 414 Creating an Initial RAM Disk Image 418When Something Goes Wrong 418 Errors During Compile 418 Runtime Errors, Boot Loader Problems, and Kernel Oops 419PART IV: UBUNTU AS A SERVERChapter 23 Sharing Files and Printers 421Using Network File System 422 Installing and Starting or Stopping NFS 422 NFS Server Configuration 422 NFS Client Configuration 423Putting Samba to Work 424 Manually Configuring Samba with /etc/samba/smb conf 426 Testing Samba with the testparm Command 429 Starting, Stopping, and Restarting the smbd Daemon 429 Mounting Samba Shares 430Network and Remote Printing with Ubuntu 431 Creating Network Printers 431 Using the CUPS GUI 433 Avoiding Printer Support Problems 434Chapter 24 Common Web Server Stacks 437LAMP 437LEMP 439MEAN 440Chapter 25 Apache Web Server Management 443About the Apache Web Server 443Installing the Apache Server 444 Starting and Stopping Apache 444Runtime Server Configuration Settings 446 Runtime Configuration Directives 446 Editing apache2 conf 447 Apache Multiprocessing Modules 449 Using htaccess Configuration Files 450File System Authentication and Access Control 452 Restricting Access with Require 452 Authentication 453 Final Words on Access Control 455Apache Modules 455 mod_access 456 mod_alias 456 mod_asis 456 mod_auth 457 mod_auth_anon 457 mod_auth_dbm 457 mod_auth_digest 457 mod_autoindex4 58 mod_cgi 458 mod_dir and mod_env 458 mod_expires 458 mod_headers 458 mod_include 459 mod_info and mod_log_config 459 mod_mime and mod_mime_magic 459 mod_negotiation 459 mod_rewrite 459 mod_setenvif 460 mod_speling 460 mod_status 460 mod_ssl 460 mod_unique_id 460 mod_userdir 460 mod_usertrack 460 mod_vhost_alias 460Virtual Hosting 461 Address-Based Virtual Hosts 461 Name-Based Virtual Hosts 461Logging 463HTTPS 464Chapter 26 Nginx Web Server Management 467About the Nginx Web Server 467Installing the Nginx Server 469 Installing from the Ubuntu Repositories 469 Building the Source Yourself 469Configuring the Nginx Server 470Virtual Hosting 473Setting Up PHP 474Adding and Configuring Modules 475HTTPS 476Chapter 27 Other HTTP Servers 479Lighttpd 479Yaws 480Cherokee 480Jetty 481thttpd 481Apache Tomcat 482WildFly 482Caddy 482Chapter 28 Administering Relational Database Services 483A Brief Review of Database Basics 484 How Relational Databases Work 486 Understanding SQL Basics 487 Creating Tables 488 Inserting Data into Tables 489 Retrieving Data from a Database 490Choosing a Database: MySQL Versus PostgreSQL 492 Speed 492 Data Locking 492 ACID Compliance in Transaction Processing to Protect Data Integrity 493 SQL Subqueries 494 Procedural Languages and Triggers 494Configuring MySQL 494 Setting a Password for the MySQL Root User 495 Creating a Database in MySQL 496Configuring PostgreSQL 498 Initializing the Data Directory in PostgreSQL 498 Creating a Database in PostgreSQL 499 Creating Database Users in PostgreSQL 499 Deleting Database Users in PostgreSQL 500 Granting and Revoking Privileges in PostgreSQL 500Database Clients 501 SSH Access to a Database 501 Local GUI Client Access to a Database 503 Web Access to a Database 503 The MySQL Command-Line Client 504 The PostgreSQL Command-Line Client 505 Graphical Clients 506Chapter 29 NoSQL Databases 509Key/Value Stores 512 Berkeley DB 512 Cassandra 513 etcd 513 Memcached and MemcacheDB 513 Redis 514 Riak 514 Scylla 514Document Stores 514 CouchDB 515 MongoDB 516 BaseX 517Wide Column Stores 517 BigTable 517 HBase 518Graph Stores 518 Neo4j 518 OrientDB 519 HyperGraphDB 519 FlockDB 519Chapter 30 Virtualization on Ubuntu 521KVM 523VirtualBox 527VMware 528Xen 528Chapter 31 Containers and Ubuntu 531LXC and LXD 532Docker 533Kubernetes 534Chapter 32 Ubuntu and Cloud Computing 535Why a Cloud? 536 Software as a Service (SaaS) 537 Platform as a Service (PaaS) 537 Infrastructure as a Service (IaaS) 537 Metal as a Service (MaaS) 537 Things to Consider Before You Make Any Decisions 538Ubuntu on the Public Cloud 538 OpenStack 538 Amazon Web Services 539 Google Cloud 539 Microsoft Azure 539 Hybrid Clouds 539Canonical-Specific Cloud Offerings 540 Juju 540 Mojo: Continuous Delivery for Juju 541 Landscape 541Chapter 33 Managing Sets of Servers 543Puppet 543Chef 544Ansible 544SaltStack 544CFEngine 545Juju 545Landscape 545Chapter 34 Handling Email 547How Email Is Sent and Received 547 The Mail Transport Agent 548 Choosing an MTA 550 The Mail Delivery Agent 550 The Mail User Agent 551Basic Postfix Configuration and Operation 552 Configuring Masquerading 554 Using Smart Hosts 554 Setting Message Delivery Intervals 555 Mail Relaying 555 Forwarding Email with Aliases 556Using Fetchmail to Retrieve Mail 557 Installing Fetchmail 557 Configuring Fetchmail 557Choosing a Mail Delivery Agent 560 Procmail 561 Spamassassin 561 Squirrelmail 561 Virus Scanners 562 Autoresponders 562Chapter 35 Proxying, Reverse Proxying, and Virtual Private Networks (VPNs) 563What Is a Proxy Server? 563Installing Squid 564Configuring Clients 564Access Control Lists 565Specifying Client IP Addresses 569Sample Configurations 570Virtual Private Networks (VPNs) 572 Setting Up a VPN Client 573 Setting Up a VPN Server 575Chapter 36 Lightweight Directory Access Protocol (LDAP) 579Configuring the Server 580 Creating Your Schema 580 Populating Your Directory 582Configuring Clients 584LDAP Administration 584Chapter 37 Name Serving with the Domain Name System (DNS) 587Understanding Domain Names 588 DNS Servers 589 DNS Records 590Setting Up a DNS Server with BIND 593PART V: PROGRAMMING LINUXChapter 38 Using Programming Tools 597Programming in C with Linux 598Using the C Programming Project Management Tools Provided with Ubuntu 599 Building Programs with make 599 Using the autoconf Utility to Configure Code 601 Debugging Tools 602Using the GNU C Compiler 603Programming in Java with Linux 604Graphical Development Tools 605 IDEs and SDKs 605 Using the KDevelop Client 606 The Glade Client for Developing in GNOME 607Beginning Mobile Development for Android 607 Hardware 608 Linux Kernel 608 Libraries 608 Android Runtime 608 Application Framework 608 Applications 609 Installing Android Studio 609 Creating Your First Android Application 609Version Control Systems 609 Managing Software Projects with Git 610 Managing Software Projects with Bazaar 611 Managing Software Projects with Subversion 612Continuous Integration and Continuous Delivery and DevOps Tools 613 CI/CD Tools 614 Chaos Engineering 614Canonical-created Tools 614 Launchpad 614 Ubuntu Make 615 Creating Snap Packages 615 Bikeshed and Other Tools 616Chapter 39 Using Popular Programming Languages 621Ada 622Clojure 622COBOL 623D 624Dart 624Elixir 625Elm 625Erlang 625Forth 626Fortran 626Go 626Groovy 627Haskell 627Java 627JavaScript 628Kotlin 628Lisp 629Lua 629Mono 629OCaml 630Perl 630PHP 631Python 631Raku 631Ruby 631Rust 632Scala 632Scratch 632Vala 633Chapter 40 Helping with Ubuntu Development 635Introduction to Ubuntu Development 636Setting Up Your Development System 637 Install Basic Packages and Configure 637 Creating a Launchpad Account 638 Setting Up Your Environment to Work with Launchpad 638Fixing Bugs and Packaging 640Chapter 41 Helping with Ubuntu Testing and QA 645Community Teams 645 Ubuntu Testing Team 646 Ubuntu QA Team 646Bug Squad 647References 647Index 649PART VI: BONUS ONLINE-ONLY CHAPTERSChapter 42 Using Perl (Online) Web:1Using Perl with Linux Web:1 Perl Versions Web:2 A Simple Perl Program Web:2Perl Variables and Data Structures Web:4 Perl Variable Types Web:4 Special Variables Web:5Perl Operators Web:6 Comparison Operators Web:6 Compound Operators Web:7 Arithmetic Operators Web:7 Other Operators Web:8 Special String Constants Web:8Conditional Statements: if/else and unless Web:9 If Web:9 unless Web:9Looping Web:10 for Web:10 foreach Web:10 while Web:11 until Web:11 last and next Web:12 do while and do until Web:12Regular Expressions Web:12Access to the Shell Web:13Modules and CPAN Web:14Code Examples Web:15 Sending Mail Web:15 Purging Logs Web:17 Posting to Usenet Web:18 One-Liners Web:19 Command-Line Processing Web:19Chapter 43 Using Python (Online) Web:21Python on Linux Web:22The Basics of Python Web:23 Numbers Web:23 More on Strings Web:24 Lists Web:27 Dictionaries Web:30 Conditionals and Looping Web:30Functions Web:33Object Orientation Web:34 Class and Object Variables Web:34 Constructors and Destructors Web:35 Class Inheritance Web:36The Standard Library and the Python Package Index Web:38Chapter 44 Using PHP (Online) Web:39Introduction to PHP Web:39 Entering and Exiting PHP Mode Web:40 Variables Web:40 Arrays Web:42 Constants Web:43 References Web:44 Comments Web:44 Escape Sequences Web:45 Variable Substitution Web:46 Operators Web:46 Conditional Statements Web:48 Special Operators Web:50 Switching Web:51 Loops Web:52 Including Other Files Web:54Basic Functions Web:55 Strings Web:55 Arrays Web:58 Files Web:60 Miscellaneous Web:63Handling HTML Forms Web:66Databases Web:67
Usb Redirector 6 4 Keygen 17
2ff7e9595c
コメント