Ubuntu Linux Bible - David Clinton - E-Book

Ubuntu Linux Bible E-Book

David Clinton

0,0
32,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

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 10th Edition 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 10th Edition is a must-have for anyone looking for an accessible, step-by-step tutorial on this hugely popular Linux operating system.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 1252

Veröffentlichungsjahr: 2020

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Cover

About the Authors

About the Technical Editor

Acknowledgments

Introduction

How This Book Is Organized

Conventions Used in This Book

Jumping into Linux

How to Contact Wiley or the Authors

Part I: Getting Started

CHAPTER 1: Starting with Linux

Understanding What Linux Is

Understanding How Linux Differs from Other Operating Systems

Exploring Linux History

Understanding How Linux Distributions Emerged

Finding Professional Opportunities with Linux Today

Summary

CHAPTER 2: Creating the Perfect Linux Desktop

Understanding Linux Desktop Technology

Starting with the GNOME 3 Desktop Live Image

Using the GNOME 3 Desktop

Using the Unity Graphical Shell with the GNOME Desktop

Summary

Exercises

Part II: Becoming a Linux Power User

CHAPTER 3: Using the Shell

About Shells and Terminal Windows

Choosing Your Shell

Running Commands

Recalling Commands Using Command History

Connecting and Expanding Commands

Using Shell Variables

Creating Your Shell Environment

Getting Information about Commands

Summary

Exercises

CHAPTER 4: Moving Around the Filesystem

Using Basic Filesystem Commands

Using Metacharacters and Operators

Listing Files and Directories

Understanding File Permissions and Ownership

Moving, Copying, and Removing Files

Summary

Exercises

CHAPTER 5: Working with Text Files

Editing Files with Vim and Vi

Finding Files

Summary

Exercises

CHAPTER 6: Managing Running Processes

Understanding Processes

Listing Processes

Managing Background and Foreground Processes

Killing and Renicing Processes

Limiting Processes with cgroups

Summary

Exercises

CHAPTER 7: Writing Simple Shell Scripts

Understanding Shell Scripts

Summary

Exercises

Part III: Becoming a Linux System Administrator

CHAPTER 8: Learning System Administration

Understanding System Administration

Using Graphical Administration Tools

Invoking Administration Privileges

Exploring Administrative Commands, Configuration Files, and Log Files

Using Other Administrative Accounts

Checking and Configuring Hardware

Summary

Exercises

CHAPTER 9: Installing Linux

Choosing a Computer

Installing Ubuntu Desktop

Installing Ubuntu Server

Understanding Cloud-Based Installations

Installing Linux in the Enterprise

Exploring Common Installation Topics

Summary

Exercises

CHAPTER 10: Getting and Managing Software

Managing Software on the Desktop

Going Beyond the Software Window

Understanding Linux Software Packaging

Working with Debian Packaging

Summary

Exercises

CHAPTER 11: Managing User Accounts

Creating User Accounts

Understanding Group Accounts

Managing Users in the Enterprise

Centralizing User Accounts

Summary

Exercises

CHAPTER 12: Managing Disks and Filesystems

Understanding Disk Storage

Partitioning Hard Disks

Using Logical Volume Manager Partitions

Mounting Filesystems

Using the mkfs Command to Create a Filesystem

Managing Storage with Cockpit

Summary

Exercises

Part IV: Becoming a Linux Server Administrator

CHAPTER 13: Understanding Server Administration

Getting Started with Server Administration

Checking and Setting Servers

Managing Remote Access with the Secure Shell Service

Configuring System Logging

Checking System Resources with sar

Checking System Space

Managing Servers in the Enterprise

Summary

Exercises

CHAPTER 14: Administering Networking

Configuring Networking for Desktops

Configuring Networking from the Command Line

Configuring Networking in the Enterprise

Summary

Exercises

CHAPTER 15: Starting and Stopping Services

Understanding the Initialization Daemon (init or systemd)

Checking the Status of Services

Stopping and Starting Services

Enabling Persistent Services

Configuring a Default Runlevel or Target Unit

Adding New or Customized Services

Summary

Exercises

Chapter 16: Configuring a Print Server

Common UNIX Printing System

Setting Up Printers

Working with CUPS Printing

Using Printing Commands

Configuring Print Servers

Summary

Exercises

CHAPTER 17: Configuring a Web Server

Understanding the Apache Web Server

Getting and Installing Your Apache Web Server

Controlling Apache

Troubleshooting Your Web Server

Summary

Exercises

CHAPTER 18: Configuring an FTP Server

Understanding FTP

Installing the vsftpd FTP Server

Controlling the vsftpd Service

Configuring Your FTP Server

Using FTP Clients to Connect to Your Server

Summary

Exercises

CHAPTER 19: Configuring a Windows File Sharing (Samba) Server

Understanding Samba

Installing Samba

Controlling Samba

Configuring Samba

Accessing Samba Shares

Using Samba in the Enterprise

Summary

Exercises

CHAPTER 20: Configuring an NFS File Server

Installing an NFS Server

Starting the NFS Service

Sharing NFS Filesystems

Securing Your NFS Server

Using NFS Filesystems

Unmounting NFS Filesystems

Summary

Exercises

CHAPTER 21: Troubleshooting Linux

Boot-Up Troubleshooting

Troubleshooting Software Packages

Troubleshooting Networking

Troubleshooting Memory

Summary

Exercises

Part V: Learning Linux Security Techniques

CHAPTER 22: Understanding Basic Linux Security

Implementing Physical Security

Monitoring Your Systems

Auditing and Reviewing Linux

Summary

Exercises

CHAPTER 23: Understanding Advanced Linux Security

Implementing Linux Security with Cryptography

Implementing Linux Security with PAM

Summary

Exercises

CHAPTER 24: Enhancing Linux Security with AppArmor

Understanding AppArmor

Working with AppArmor

Summary

Exercises

CHAPTER 25: Securing Linux on a Network

Auditing Network Services

Working with Firewalls

Summary

Exercises

Part VI: Engaging with Cloud Computing

CHAPTER 26: Shifting to Clouds and Containers

Understanding Linux Containers

Working with Linux Containers

Summary

Exercises

CHAPTER 27: Deploying Linux to the Public Cloud

Running Linux in the Cloud Using cloud-init

Creating LXD Linux Images for Cloud Deployments

Using Amazon EC2 to Deploy Cloud Images

Summary

Exercises

CHAPTER 28: Automating Apps and Infrastructure with Ansible

Understanding Ansible

Exploring Ansible Components

Stepping Through an Ansible Deployment

Installing Ansible

Running Ad-Hoc Ansible Commands

Summary

Exercises

CHAPTER 29: Deploying Applications as Containers with Kubernetes

Understanding Kubernetes

Trying Kubernetes

Summary

Exercises

Appendix: Exercise Answers

Chapter 2: Creating the Perfect Linux Desktop

Chapter 3: Using the Shell

Chapter 4: Moving Around the Filesystem

Chapter 5: Working with Text Files

Chapter 6: Managing Running Processes

Chapter 7: Writing Simple Shell Scripts

Chapter 8: Learning System Administration

Chapter 9: Installing Linux

Chapter 10: Getting and Managing Software

Chapter 11: Managing User Accounts

Chapter 12: Managing Disks and Filesystems

Chapter 13: Understanding Server Administration

Chapter 14: Administering Networking

Chapter 15: Starting and Stopping Services

Chapter 16: Configuring a Print Server

Chapter 17: Configuring a Web Server

Chapter 18: Configuring an FTP Server

Chapter 19: Configuring a Windows File Sharing (Samba) Server

Chapter 20: Configuring an NFS File Server

Chapter 21: Troubleshooting Linux

Chapter 22: Understanding Basic Linux Security

Chapter 23: Understanding Advanced Linux Security

Chapter 24: Enhancing Linux Security with AppArmor

Chapter 25: Securing Linux on a Network

Chapter 26: Shifting to Clouds and Containers

Chapter 27: Deploying Linux to the Public Cloud

Chapter 28: Automating Apps and Infrastructure with Ansible

Chapter 29: Deploying Applications as Containers with Kubernetes

Index

End User License Agreement

List of Tables

Chapter 3

TABLE 3.1 Keystrokes for Navigating Command Lines

TABLE 3.2 Keystrokes for Editing Command Lines

TABLE 3.3 Keystrokes for Cutting and Pasting Text from within Command Lines

TABLE 3.4 Keystrokes for Using Command History

TABLE 3.5 Common Shell Environment Variables

TABLE 3.6 Bash Configuration Files

TABLE 3.7 Characters to Add Information to

bash

Prompt

TABLE 3.8 Manual Page Sections

Chapter 4

TABLE 4.1 Commands to Create and Use Files

TABLE 4.2 Setting Read, Write, and Execute Permissions

Chapter 6

TABLE 6.1 Signals Available in Linux

Chapter 7

TABLE 7.1 Operators for Test Expressions

Chapter 9

TABLE 9.1 Boot Options for Disabling Features

TABLE 9.2 Boot Options for Video Problems

TABLE 9.3 Boot Options for VNC Installations

TABLE 9.4 Assigning Partitions to Particular Directories

Chapter 11

TABLE 11.1 Commands to Create and Use Files

Chapter 15

TABLE 15.1 Standard Linux Runlevels

Chapter 22

TABLE 22.1 chage Options

TABLE 22.2 Viewing Log Files That Need Special Commands

TABLE 22.3 Additional Filesystem Scans

TABLE 22.4 Popular Linux Intrusion Detection Systems

Chapter 23

TABLE 23.1 Cryptography Ciphers

TABLE 23.2 Linux Miscellaneous Cryptography Tools

TABLE 23.3 PAM Contexts

TABLE 23.4 PAM Configuration Control Flags and Response Handling

Chapter 25

TABLE 25.1 Chains Available for Each netfilter/iptables Table

List of Illustrations

Chapter 2

FIGURE 2.1 Starting with the GNOME 3 desktop in Ubuntu

FIGURE 2.2 Show all windows on the desktop minimized.

FIGURE 2.3 Show the list of available applications.

FIGURE 2.4 Click the right mouse button to display an application's selectio...

FIGURE 2.5 As new desktops are used, additional ones appear on the right.

FIGURE 2.6 The System Settings window

FIGURE 2.7 Change desktop settings using the GNOME Tweak Tool (Appearance se...

FIGURE 2.8 Access remote folders using the Nautilus Connect to Server featur...

FIGURE 2.9 Download and install software from the Ubuntu repository.

Chapter 4

FIGURE 4.1 The Linux filesystem is organized as a hierarchy of directories....

Chapter 6

FIGURE 6.1 Displaying running processes with

top

FIGURE 6.2 Use the System Monitor window to view and change running processe...

FIGURE 6.3 Renice, kill, or pause a process from the System Monitor window....

Chapter 8

FIGURE 8.1 Logging in to Cockpit

FIGURE 8.2 View system activity and other topics from the Cockpit dashboard....

Chapter 9

FIGURE 9.1 A list of the many architectures on which Ubuntu can be installed...

FIGURE 9.2 The initial dialog for starting your installation

FIGURE 9.3 Select the keyboard layout you'll use.

FIGURE 9.4 Choose the software you want installed.

FIGURE 9.5 Choose how you want your storage drives configured.

FIGURE 9.6 The main dialog where you can manually edit your disks and partit...

FIGURE 9.7 Creating a separate

/boot

partition

FIGURE 9.8 A complete manual partition configuration

FIGURE 9.9 Select a regular or MaaS server configuration.

FIGURE 9.10 Choosing Manual IPv4 configurations lets you define a static IP ...

FIGURE 9.11 Selecting a mirror for downloading software archives.

FIGURE 9.12 Select software packages for popular server workloads.

FIGURE 9.13 A typical GRUB menu accessible at boot time

Chapter 10

FIGURE 10.1 Install and manage software packages from the Software window.

Chapter 11

FIGURE 11.1 Add and modify user accounts from Cockpit.

Chapter 12

FIGURE 12.1 LVM logical volumes can be mounted like regular partitions on a ...

FIGURE 12.2 View storage devices, filesystems, and activities from the Cockp...

FIGURE 12.3 View and change disk partitions for a select storage device.

Chapter 13

FIGURE 13.1 The System page of Cockpit

Chapter 14

FIGURE 14.1 Checking network interfaces with NetworkManager

FIGURE 14.2 Viewing security for a wireless network using NetworkManager

FIGURE 14.3 Viewing and changing network settings from Cockpit

FIGURE 14.4 Changing network settings with NetworkManager

FIGURE 14.5 Configuring networking with NetworkManager TUI

Chapter 16

FIGURE 16.1 CUPS provides a web‐based administration tool.

FIGURE 16.2 You can do administration tasks from the Printers tab.

Chapter 17

FIGURE 17.1 The Ubuntu version of the Apache2 introduction page

FIGURE 17.2 A custom HTML page within a simple Apache website

FIGURE 17.3 The Certbot instructions page

Chapter 18

FIGURE 18.1 Accessing a remote FTP server from the Brave browser

FIGURE 18.2 The gFTP FTP client lets you see both sides of an FTP session.

Chapter 20

FIGURE 20.1 Add a new NFS mount using Cockpit Web UI.

Chapter 21

FIGURE 21.1 Interrupt the GRUB boot loader to modify the boot process.

FIGURE 21.2 Snippet from

systemd-analyze

startup plot

Chapter 23

FIGURE 23.1 Basic asymmetric key cryptography

Chapter 27

FIGURE 27.1 Click to access the Security Credentials page on the AWS Managem...

FIGURE 27.2 Finding an available Ubuntu EC2 image ID on the Console

Guide

Cover

Table of Contents

Begin Reading

Pages

iii

iv

v

vii

ix

xxix

xxx

xxxi

xxxii

xxxiii

xxxiv

1

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

383

384

385

386

387

388

389

390

391

392

393

394

395

396

397

398

399

400

401

402

403

404

405

406

407

408

409

410

411

413

414

415

416

417

418

419

420

421

422

423

424

425

426

427

429

430

431

432

433

434

435

436

437

438

439

440

441

442

443

444

445

447

448

449

450

451

452

453

454

455

456

457

458

459

460

461

462

463

464

465

467

468

469

470

471

472

473

474

475

476

477

478

479

480

481

482

483

484

485

486

487

488

489

490

491

493

495

496

497

498

499

500

501

502

503

504

505

506

507

508

509

510

511

512

513

514

515

516

517

518

519

520

521

522

523

525

526

527

528

529

530

531

532

533

534

535

536

537

538

539

540

541

542

543

544

545

546

547

548

549

550

551

552

553

554

555

556

557

558

559

560

561

562

563

564

565

566

567

568

569

570

571

572

573

574

575

576

577

578

579

580

581

582

583

584

585

587

588

589

590

591

592

593

594

595

596

597

598

599

600

601

602

603

604

605

606

607

608

609

610

611

612

613

614

615

616

617

618

619

620

621

622

623

624

625

626

627

628

629

630

631

632

633

634

635

636

637

638

639

640

641

642

643

644

645

646

647

648

649

650

651

652

653

654

655

656

657

658

659

660

661

662

663

664

665

666

667

668

669

670

671

672

673

674

675

676

677

678

679

680

681

682

683

684

685

686

687

688

689

690

691

692

693

694

695

696

697

698

699

701

702

703

704

705

706

707

708

709

710

711

712

713

714

715

716

717

718

719

Ubuntu® Linux® Bible

 

 

 

 

 

David Clinton

Christopher Negus

 

 

 

Published by

John Wiley & Sons, Inc.

10475 Crosspoint Boulevard

Indianapolis, IN 46256

www.wiley.com

Copyright © 2021 by John Wiley & Sons, Inc., Indianapolis, Indiana

Published simultaneously in Canada

ISBN: 978-1-119-72233-5

ISBN: 978-1-119-72234-2 (ebk)

ISBN: 978-1-119-72235-9 (ebk)

Manufactured in the United States of America

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at www.wiley.com/go/permissions.

LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.

For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.

Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com.

Library of Congress Control Number: 2020945959

Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. Ubuntu is a registered trademark of Canonical Limited. Linux is a registered trademark of Linus Torvalds. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.

About the Authors

David Clinton is a Linux server admin and AWS Solutions Architect who has worked with IT infrastructure in both academic and enterprise environments. He's administrated physical systems, containers, and networks using many Ubuntu flavors for more than a dozen years. He has authored technology books—including AWS Certified Solutions Architect Study Guide: Associate SAA-C01 Exam (Sybex, 2020)—and created tens of video courses for Pluralsight teaching Amazon Web Services and Linux administration, server virtualization, and IT security.

In a previous life, David spent 20 years as a high school teacher. He currently lives in Toronto, Canada, with his wife and family and can be reached through his website: www.bootstrap-it.com.

Chris Negus is a principal technical writer for Red Hat, Inc. In his decades of working with Linux and UNIX, Chris has taught hundreds of IT professionals to become certified Linux engineers, and he has written scores of documents on everything from Linux to virtualization to cloud computing and containerization.

Chris has also written and contributed to dozens of books on Linux and UNIX, including the Linux Bible (all editions), Linux Troubleshooting Bible, Red Hat Linux Bible (all editions), Docker Containers, CentOS Bible, Fedora Bible, Linux Toys, and Linux Toys II. Chris also co-authored several books for the Linux Toolbox series for power users: Ubuntu Linux Toolbox, Fedora Linux Toolbox, SUSE Linux Toolbox, Mac OS X Toolbox, and BSD UNIX Toolbox.

Before becoming an author and educator, Chris worked for eight years with the organization at AT&T that developed the UNIX operating system before moving to Utah to help contribute to Novell's UnixWare project in the early 1990s. When not writing about Linux, Chris enjoys playing soccer, hanging out with his wife, Sheree, and spending what time he can with his sons, Seth and Caleb.

About the Technical Editor

Jason W. Eckert is an experienced technical trainer, consultant, and best-selling author in the technology industry. With 45 industry certifications, over 30 years of technology and programming experience, 4 published apps, and 25 published textbooks covering topics such as UNIX, Linux, Security, Windows Server, Microsoft Exchange Server, PowerShell, BlackBerry Enterprise Server, and Video Game Development, Mr. Eckert brings his expertise to every class that he teaches at triOS College. He was also named 2019 Outstanding Train-the-Trainer from the Computing Technology Industry Association (CompTIA). For more information about Mr. Eckert, visit www.jasoneckert.net.

Acknowledgments

Looking through the chapters of this book forces me to wonder at the size and ambition of the world of open source software. And that makes me think about all the thousands of developers, admins, architects, and—yes—writers who make this vast universe possible. This book is a testament to the hard work and community spirit of those individuals.

I would like to thank my wife for all her help and support through the long and demanding process of writing these books. And, once again, I'm indebted to all the great people at Wiley who helped me turn a plain old manuscript into a great teaching tool.

—David Clinton

When I was hired at Red Hat about a dozen years ago, I didn't know that the organization would grow to about seven times its size, be bought by IBM for $34 billion, and (so far) still maintain the spirit of openness and excitement that it had when I first signed on. Every day when I come to work, I interact with many of the greatest Linux and cloud developers, testers, instructors, and support professionals in the world.

While I can't thank everyone individually, there are a few people that I want to acknowledge in particular. I have the good fortune to take on so many cool and challenging projects because of the freedom that I receive from the people to whom I report at work. They include Michelle Bearer, Dawn Eisner, and Sam Knuth. Sam in particular has had my back and encouraged my work for more than a decade.

In my daily work, I want to give a shout out to my incredibly talented colleagues Scott McCarty, Ben Breard, Laurie Friedman, Dave Darrah, Micah Abbott, Steve Milner, Ian McLeod, Tom McKay, Joey Schorr, Bill Dettelback, Richa Marwaha, and Dirk Herrmann. Finally, a special thank you to Vikram Goyal, who luckily lives in Australia, so he is always available to bail me out when I blow up git in the middle of the night.

When it comes to support for writing this book, I have had the luxury of an excellent technical editor: Jason Eckert. He also worked on my most recent edition of The Linux Bible, and his broad experience with Linux systems has helped immensely. As for Devon Lewis, Kelly Talbot, and the people at Wiley, thanks for letting me continue to develop and improve this book over the years. Thanks also to Margot Maley Hutchison from Waterside Productions for contracting the book for me with Wiley and always looking out for my best interests.

Finally, thanks to my wife, Sheree, for sharing her life with me and doing such a great job raising Seth and Caleb.

—Christopher Negus

Introduction

You can't learn Ubuntu without using it. But if you're ready for some serious hands-on research and experimentation, you can go a long way with this book. The Ubuntu Linux Bible is based on the 10th edition of Linux Bible, but has been refocused to ensure everything will work specifically on Ubuntu “right out of the box.”

Ubuntu may be the world's most popular all-purpose Linux distribution. Canonical, the company that stands behind Ubuntu, reports that “Ubuntu powers millions of PCs worldwide.” It describes it as “the world's most popular operating system across public clouds and OpenStack clouds” and “the #1 OS for containers.” In fact, as of this writing, of the more than a million virtual server instances currently running on the Amazon Web Services cloud, more than 32 percent are standalone Ubuntu installations (the total number, when you include Bitnami stacks, is probably closer to 60 percent). Compare that to Microsoft Windows share of 6 percent and the 2 percent attributed to Red Hat Enterprise Linux (see www.thecloudmarket.com/stats).

Ubuntu has become such an industry standard that when Microsoft released its Windows Subsystem for Linux feature back in 2016, Ubuntu was the only Linux distribution initially available.

Most of the skills we'll learn here will transfer well to other Linux distributions—and especially to distros like Debian, Mint, and Kali Linux that share upstream sources with Ubuntu. So if you're looking to get in on the action, stick around for the whole thing.

Beginner to certified professional:

As long as you have used a computer, mouse, and keyboard, you can reach good places using this book. We'll show you how to get and install Ubuntu, quickly put it to productive use, use it to solve critical problems and build powerful server environments, and ultimately excel at administering and securing it.

System administrator focused:

When you're finished with this book, you will know how to use, modify, and maintain Ubuntu. Almost all of the topics needed to achieve one or more Linux administration certifications are covered in this book. That said, many software developers and hobbyists will also enjoy it as they work to improve their skills.

Emphasis on command-line tools:

Although point-and-click graphic interfaces are as good or better as anything else these days, many advanced features can only be utilized by entering commands and editing configuration files manually. We'll mostly focus on mastering the Linux command-line shell.

Many, many demos and exercises:

Instead of just telling you what Ubuntu does, we actually show you what it does. Then, to make sure that you've nailed it, you'll have the opportunity to try it yourself. Every procedure and exercise has been tested to work in Ubuntu.

Ubuntu Linux Bible includes in-depth discussions covering server virtualization, infrastructure orchestration, and managing cloud and containerized applications (individually or at scale):

Cockpit administration web UI:

Since the dawn of the Linux age, people have struggled to develop simple graphical or browser-based interfaces for managing Linux systems. Cockpit may well have finally delivered a way to manage the basic Linux features through its web UI. Throughout this book, Cockpit will be our graphic tool of choice. With Cockpit, you can now add users, manage storage, monitor activities, and do many other administrative tasks through a single interface.

Cloud technologies:

Our coverage will include setting up your own Linux host for running virtual machines and running Linux in a cloud environment, such as Amazon Web Services. Linux is at the heart of most technological advances in cloud computing today. That means you need a solid understanding of Linux to work effectively in tomorrow's data centers. The first chapters will cover all the Linux basics, which you'll use through our various cutting-edge virtualization, networking, and storage administration exercises.

Ansible:

Automating tasks for managing systems is now an unavoidable part of modern digital administration. Using Ansible, you can create playbooks that define the state of a Linux system. This includes things like setting which packages are installed, which services are running, and how features are configured. A playbook can configure one system or a thousand systems, be combined to form a set of system services, and be run again to return a system to a defined state. We'll get introduced to Ansible, create our first Ansible playbook, and run ad-hoc Ansible commands.

Containers:

Packaging and running applications in containers is becoming the preferred method for deploying, managing, and updating small, scalable software services and features. You'll learn how to pull container images, run them, stop them, and even build your own container images using LXD and Docker.

Kubernetes:

While containers are nice on their own, to be able to deploy, manage, and upgrade containers in a large enterprise, you need an orchestration platform. The Kubernetes project provides a powerful platform for just that purpose.

How This Book Is Organized

The book is organized to enable you to start off at the very beginning with Linux and grow to become a professional Ubuntu system administrator and power user.

Part I, “Getting Started,” includes two chapters designed to help you understand what Linux is and get you started with an Ubuntu desktop:

Chapter 1

, “Starting with Linux,” covers topics such as what the Linux operating system is, where Ubuntu fits in, and how to get started using it.

Chapter 2

, “Creating the Perfect Linux Desktop,” provides information on how you can create a desktop system and use some of the most popular desktop features.

Part II, “Becoming a Linux Power User,” provides in-depth details on how to use the Linux shell, work with filesystems, manipulate text files, manage processes, and use shell scripts:

Chapter 3

, “Using the Shell,” includes information on how to access a shell, run commands, recall commands (using history), and do tab completion. The chapter also describes how to use variables, aliases, and man pages (traditional Linux command reference pages).

Chapter 4

, “Moving Around the Filesystem,” includes commands for listing, creating, copying, and moving files and directories. More advanced topics in this chapter include filesystem security, such as file ownership, permissions, and access control lists.

Chapter 5

, “Working with Text Files,” includes everything from basic text editors to tools for finding files and searching for text within files.

Chapter 6

, “Managing Running Processes,” describes how to see what processes are running on your system and change them. Ways of changing processes include killing, pausing, and sending other types of signals.

Chapter 7

, “Writing Simple Shell Scripts,” includes shell commands and functions that you can gather together into a file to run as a command itself.

In Part III, “Becoming a Linux System Administrator,” you learn how to administer Ubuntu systems:

Chapter 8

, “Learning System Administration,” provides information on basic graphical tools, commands, and configuration files for administering Ubuntu systems. It introduces the Cockpit web UI for simplified, centralized administration.

Chapter 9

, “Installing Linux,” covers common installation tasks, such as disk partitioning and initial software package selection, as well as more advanced installation tools.

Chapter 10

, “Getting and Managing Software,” provides an understanding of how software packages work and how to get and manage software packages.

Chapter 11

, “Managing User Accounts,” discusses tools for adding and deleting users and groups as well as how to centralize user account management.

Chapter 12

, “Managing Disks and Filesystems,” provides information on adding partitions, creating filesystems, and mounting filesystems, as well as working with logical volume management.

In Part IV, “Becoming a Linux Server Administrator,” you learn to create powerful network servers and the tools needed to manage them:

Chapter 13

, “Understanding Server Administration,” covers remote logging, monitoring tools, and the Linux boot process.

Chapter 14

, “Administering Networking,” discusses how to configure networking.

Chapter 15

, “Starting and Stopping Services,” provides information on process management tools—especially systemd.

Chapter 16

, “Configuring a Print Server,” describes how to configure printers to use locally on your Ubuntu system or over the network from other computers.

Chapter 17

, “Configuring a Web Server,” describes how to configure an Apache web server.

Chapter 18

, “Configuring an FTP Server,” covers procedures for setting up a vsftpd FTP server that can be used by others to download files from your Ubuntu system over the network.

Chapter 19

, “Configuring a Windows File Sharing (Samba) Server,” covers Windows file server configuration with Samba.

Chapter 20

, “Configuring an NFS File Server,” describes how to use Network File System features to share folders of files among systems over a network.

Chapter 21

, “Troubleshooting Linux,” covers popular tools for troubleshooting your Ubuntu system.

In Part V, “Learning Linux Security Techniques,” you learn how to secure your Linux systems and services:

Chapter 22

, “Understanding Basic Linux Security,” covers basic security concepts and techniques.

Chapter 23

, “Understanding Advanced Linux Security,” provides information on using Pluggable Authentication Modules (PAM) and cryptology tools to tighten system security and authentication.

Chapter 24

, “Enhancing Linux Security with AppArmor,” shows you how AppArmor can be configured to secure system services.

Chapter 25

, “Securing Linux on a Network,” covers network security features, such as the Uncomplicated Firewall (UFW) and

iptables

firewalls, to secure system services.

In Part VI,” Engaging with Cloud Computing,” the book pivots from a single-system focus toward containerization, cloud computing, and automation:

Chapter 26

, “Shifting to Clouds and Containers,” describes how to pull, push, start, stop, tag, and build container images.

Chapter 27

, “Deploying Linux to the Cloud,” describes how to deploy Ubuntu images to different cloud environments, including OpenStack, Amazon EC2, or a local Ubuntu system configured for virtualization.

Chapter 28

, “Automating Apps and Infrastructure with Ansible,” tells you how to create Ansible playbooks and run ad-hoc Ansible commands to automate the configuration of Ubuntu systems and other devices.

Chapter 29

, “Deploying Applications as Containers with Kubernetes,” describes the Kubernetes project and how it is used to orchestrate container images, with the potential to massively scale up for large data centers.

Part VII contains an appendix with Exercise Answers, providing sample solutions to the exercises included in Chapters 2 through 29.

Conventions Used in This Book

Throughout the book, special typography indicates code and commands. Commands and code are shown in a monospaced font:

This is how code looks.

In the event that an example includes both input and output, the monospaced font is still used, but input is presented in bold type to distinguish the two. Here's an example:

$ ftp ftp.handsonhistory.com

Name (home:jake): jake

Password: ******

Commands that must be run using administrator permissions (often through sudo ) will display a # command-line prompt, like this:

# nano /etc/group

All other commands will use the $ character, like this:

$ cat /etc/group

As for styles in the text:

New terms and important words appear in

italic

when introduced.

Keyboard strokes appear like this: Ctrl+A. This convention indicates to hold the Ctrl key as you also press the “a” key.

Filenames, URLs, and code within the text appear as follows:

persistence.properties

.

The following items call your attention to points that are particularly important.

NOTE

A Note box provides extra information to which you need to pay special attention.

TIP

A Tip box shows a special way of performing a particular task.

CAUTION

A Caution box alerts you to take special care when executing a procedure or damage to your computer hardware or software could result.

Jumping into Linux

If you are new to Linux, you might have vague ideas about what it is and where it came from. You may have heard something about it being free (as in cost) or free (as in freedom to use it as you please). Before you start putting your hands on Linux (which we'll do soon enough), Chapter 1 seeks to answer some of your questions about the origins and features of Linux and, in particular, Ubuntu.

Take your time and work through this book to get up to speed on Linux and how you can make it work to meet your needs. This is your invitation to jump in and take the first step toward becoming a Linux expert!

Visit the Ubuntu Linux Bible website

To find links to various Linux distributions, tips on gaining Linux certification, and corrections to the book as they become available, go to www.wiley.com/go/ubuntulinuxbible.

How to Contact Wiley or the Authors

If you believe you've found a mistake in this book, please bring it to our attention. At John Wiley & Sons, we understand how important it is to provide our customers with accurate content, but even with our best efforts an error may occur.

In order to submit your possible errata, please email it to our Customer Service Team at [email protected] with the subject line “Possible Book Errata Submission”.

You can contact Christopher Negus at [email protected] and David Clinton at [email protected].

Part IGetting Started

IN THIS PART

Chapter 1

Starting with Linux

Chapter 2

Creating the Perfect Linux Desktop

CHAPTER 1Starting with Linux

IN THIS CHAPTER

Learning what Linux is

Learning where Linux came from

Understanding Linux distributions

Exploring professional opportunities with Linux

Becoming certified in Linux

The operating systems war is over, and Linux has won. Proprietary operating systems simply cannot keep up with the pace of improvements and quality that Linux can achieve with its culture of sharing and innovation. Even Microsoft, whose former CEO Steve Ballmer once referred to Linux as “a cancer,” now says that Linux's use on Microsoft's Azure cloud computing service has surpassed the use of Windows.

Linux is one of the most important technological advancements of the twenty-first century. Beyond its impact on the growth of the Internet and its place as an enabling technology for a range of computer-driven devices, Linux development has become a model for how collaborative projects can surpass what single individuals and companies can do alone.

Google runs thousands upon thousands of Linux servers to power its search technology. Its Android phones are based on Linux. Likewise, when you download and run Google's Chrome OS, you get a browser that is backed by a Linux operating system.

Facebook builds and deploys its site using what is referred to as a LAMP stack (Linux, Apache web server, MySQL database, and PHP web scripting language)—all open source projects. In fact, Facebook itself uses an open source development model, making source code for the applications and tools that drive Facebook available to the public. This model has helped Facebook shake out bugs quickly, get contributions from around the world, and fuel its exponential growth.

Financial organizations that have trillions of dollars riding on the speed and security of their operating systems also rely heavily on Linux. These include the New York Stock Exchange, Chicago Mercantile Exchange, and the Tokyo Stock Exchange.

As cloud continues to be one of the hottest buzzwords today, one part of the cloud that isn't hype is that Linux and other open source technologies continue to be the foundation on which today's greatest cloud innovations are being built. Every software component that you need to build a private or public cloud (such as hypervisors, cloud controllers, network storage, virtual networking, and authentication) is freely available from within the open source world.

The widespread adoption of Linux around the world has created huge demand for Linux expertise. This chapter starts you down a path to becoming a Linux—and Ubuntu—expert by helping you understand what Linux is, where it came from, and what your opportunities are for becoming proficient in it. The rest of this book provides you with hands-on activities to help you gain that expertise. The book's final part will show you how to apply that expertise to cloud technologies, including automation tools and container orchestration technologies.

Understanding What Linux Is

Linux is a computer operating system. An operating system consists of the software that manages your computer and lets you run applications on it. The features that make up Linux and similar computer operating systems include the following:

Detecting and preparing hardware

: When the Linux system boots up (when you turn on your computer), it looks at the components on your computer (CPU, hard drive, network cards, and so on) and loads the software (drivers and modules) needed to access those particular hardware devices.

Managing processes

: The operating system must keep track of multiple processes running at the same time and decide which have access to the CPU and when. The system also must offer ways of starting, stopping, and changing the status of processes.

Managing memory

: RAM and swap space (extended memory) must be allocated to applications as they need memory. The operating system decides how requests for memory are handled.

Providing user interfaces

: An operating system must provide ways of accessing the system. The first Linux systems were accessed from a command-line interpreter called a

shell

. Today, graphical desktop interfaces are commonly available as well.

Controlling filesystems

: Filesystem structures are built into the operating system (or loaded as modules). The operating system controls ownership and access to the files and directories (folders) that the filesystems contain.

Providing user access and authentication

: Creating user accounts and allowing boundaries to be set between users is a basic feature of Linux. Separate user and group accounts enable users to control their own files and processes.

Offering administrative utilities

: In Linux, hundreds (perhaps thousands) of commands and graphical windows are available to do such things as add users, manage disks, monitor the network, install software, and generally secure and manage your computer. Web UI tools, such as Cockpit, have lowered the bar for doing complex administrative tasks.

Starting up services

: To use printers, handle log messages, and provide a variety of system and network services, processes called

daemon processes

run in the background, waiting for requests to come in. Many types of services run in Linux. Linux provides different ways of starting and stopping these services. In other words, while Linux includes web browsers to view web pages, it can also be the computer that serves up web pages to others. Popular server features include web, mail, database, printer, file, DNS, and DHCP servers.

Programming tools

: A wide variety of programming utilities for creating applications and libraries for implementing specialty interfaces are available with Linux.

As someone managing Linux systems, you need to learn how to work with these features. While many of them can be managed using graphical interfaces, an understanding of the shell command line is critical for someone administering Linux systems.

Modern Linux systems now go way beyond what the first UNIX systems (on which Linux was based) could do. Advanced features in Linux, often used in large enterprises, include the following:

Clustering

: Linux can be configured to work in clusters so that multiple systems can appear as one system to the outside world. Services can be configured to pass back and forth between cluster nodes while appearing to those using the services that they are running without interruption.

Virtualization

: To manage computing resources more efficiently, Linux can run as a virtualization host. On that host, you could run other Linux systems, Microsoft Windows, BSD, or other operating systems as virtual guests. To the outside world, each of those virtual guests appears as a separate computer. KVM and Xen are two technologies in Linux for creating virtual hosts.

Cloud computing

: To manage large-scale virtualization environments, you can use full-blown cloud computing platforms based on Linux. Projects such as OpenStack and Red Hat Virtualization (and its upstream oVirt project) can simultaneously manage many virtualization hosts, virtual networks, user and system authentication, virtual guests, and networked storage. Projects such as Kubernetes can manage containerized applications across massive data centers.

Real-time computing

: Linux can be configured for real-time computing, where high-priority processes can expect fast, predictable attention.

Specialized storage

: Instead of just storing data on the computer's hard disk, you can store it on many specialized local and networked storage interfaces that are available in Linux. Shared storage devices available in Linux include iSCSI, Fibre Channel, and Infiniband. Entire open source storage platforms include projects such as Ceph (

www.ceph.io

) and GlusterFS (

www.gluster.org

).

Some of these advanced topics are not covered in this book. However, the features covered here for using the shell, working with disks, starting and stopping services, and configuring a variety of servers should serve as a foundation for working with those advanced features.

Understanding How Linux Differs from Other Operating Systems

If you are new to Linux, chances are good that you have used a Microsoft Windows or macOS operating system. Although macOS had its roots in a free software operating system, referred to as the Berkeley Software Distribution (more on that later), operating systems from both Microsoft and Apple are considered proprietary operating systems. What that means is the following:

You cannot see the code used to create the operating system, and therefore, you cannot change the operating system at its most basic level if it doesn't suit your needs, and you can't use the operating system to build your own operating system from source code.

You cannot check the code to find bugs, explore security vulnerabilities, or simply learn what that code is doing.

You may not be able to plug your own software easily into the operating system if the creators of that system don't want to expose the programming interfaces you need to the outside world.

You might look at those statements about proprietary software and say, “What do I care? I'm not a software developer. I don't want to see or change how my operating system is built.”

That may be true. However, the fact that others can take free and open source software and use it as they please has driven the explosive growth of the Internet (think Google), mobile phones (think Android), special computing devices (think TiVo), and hundreds of technology companies. Free software has driven down computing costs and allowed for an explosion of innovation.

Maybe you don't want to use Linux—as Google, Facebook, and other companies have done—to build the foundation for a multibillion-dollar company. Nonetheless, those companies and others who now rely on Linux to drive their computer infrastructures need more and more people with the skills to run those systems.

You may wonder how a computer system that is so powerful and flexible has come to be free as well. To understand how that could be, you need to see where Linux came from. Thus the next sections of this chapter describe the strange and winding path of the free software movement that led to Linux.

Exploring Linux History

Some histories of Linux begin with the following message, titled “What would you like to see most in minix?” posted by Linus Torvalds to the comp.os.minix newsgroup on August 25, 1991, at

groups.google.com/forum/#!msg/comp.os.minix/dlNtH7RRrGA/SwRavCzVE7gJ

Linus Benedict Torvalds

Hello everybody out there using minix -

I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. This has been brewing since april, and is starting to get ready. I'd like any feedback on things people like/dislike in minix, as my OS resembles it somewhat (same physical layout of the file-system (due to practical reasons, among other things)…Any suggestions are welcome, but I won't promise I'll implement them :-)

Linus ([email protected])

PS. Yes—it's free of any minix code, and it has a multi-threaded fs. It is NOT protable[sic] (uses 386 task switching etc), and it probably never will support anything other than AT-harddisks, as that's all I have :-(.

Minix was a UNIX-like operating system that ran on PCs in the early 1990s. Like Minix, Linux was also a clone of the UNIX operating system. With few exceptions, such as Microsoft Windows, most modern computer systems (including macOS and Linux itself) were derived from UNIX operating systems, created originally by AT&T.

To truly appreciate how a free operating system could have been modeled after a proprietary system from AT&T Bell Laboratories, it helps to understand the culture in which UNIX was created and the chain of events that made the essence of UNIX possible to reproduce freely.

NOTE

To learn more about how Linux was created, pick up the book Just for Fun: The Story of an Accidental Revolutionary by Linus Torvalds (Harper Collins Publishing, 2001).

Free-flowing UNIX culture at Bell Labs

The UNIX operating system was created and, from the very beginning, nurtured in a communal environment. Its creation was not driven by market needs but by a desire to overcome impediments to producing programs. AT&T, which owned the UNIX trademark originally, eventually made UNIX into a commercial product. By that time, however, many of the concepts (and even much of the early code) that made UNIX special had fallen into the public domain.

If you are not old enough to remember when AT&T split up in 1984, you may not remember a time when AT&T was the phone company. Up until the early 1980s, AT&T didn't have to think much about competition because if you wanted a phone in the United States, you had to go to AT&T. It had the luxury of funding pure research projects. The mecca for such projects was the Bell Laboratories site in Murray Hill, New Jersey.

After a project called Multics failed around 1969, Bell Labs employees Ken Thompson and Dennis Ritchie set off on their own to create an operating system that would offer an improved environment for developing software. Up to that time, most programs were written on paper punch cards that had to be fed in batches to mainframe computers. In a 1980 lecture on “The Evolution of the UNIX Time-Sharing System,” Dennis Ritchie summed up the spirit that started UNIX:

What we wanted to preserve was not just a good environment in which to do programming, but a system around which a fellowship could form. We knew from experience that the essence of communal computing as supplied by remote-access, time-shared machines is not just to type programs into a terminal instead of a keypunch, but to encourage close communication.

The simplicity and power of the UNIX design began breaking down barriers that, until this point, had impeded software developers. The foundation of UNIX was set with several key elements:

The UNIX filesystem

: Because it included a structure that allowed levels of subdirectories (which, for today's desktop users, look like folders inside of folders), UNIX could be used to organize the files and directories in intuitive ways. Furthermore, complex methods of accessing disks, tapes, and other devices were greatly simplified by representing those devices as individual device files that you could also access as items in a directory.

Input/output redirection

: Early UNIX systems also included input redirection and pipes. From a command line, UNIX users could direct the output of a command to a file using a right-arrow key (

>

). Later, the concept of pipes (

|

) was added where the output of one command could be directed to the input of another command. For example, the following command line concatenates (

cat

) file1 and file2, sorts (

sort

) the lines in those files alphabetically, paginates the sorted text for printing (

pr

), and directs the output to the computer's default printer (

lp

):

$ cat file1 file2 | sort | pr | lp

This method of directing input and output enabled developers to create their own specialized utilities that could be joined with existing utilities. This modularity made it possible for lots of code to be developed by lots of different people. A user could just put together the pieces they needed.

Portability

: Simplifying the experience of using UNIX also led to it becoming extraordinarily portable to run on different computer hardware. By having device drivers (represented by files in the filesystem tree), UNIX could present an interface to applications in such a way that the programs didn't have to know about the details of the underlying hardware. To port UNIX later to another system, developers had only to change the drivers. The application programs didn't have to change for different hardware!

To make portability a reality, however, a high-level programming language was needed to implement the software. To that end, Brian Kernighan and Dennis Ritchie created the C programming language. In 1973, UNIX was rewritten in C. Today, C is still the primary language used to create the UNIX (and Linux) operating system kernels.

As Ritchie went on to say in a 1979 lecture (www.bell-labs.com/usr/dmr/www/hist.html):

Today, the only important UNIX program still written in assembler is the assembler itself; virtually all the utility programs are in C, and so are most of the application's programs, although there are sites with many in Fortran, Pascal, and Algol 68 as well. It seems certain that much of the success of UNIX follows from the readability, modifiability, and portability of its software that in turn follows from its expression in high-level languages.

If you are a Linux enthusiast and are interested in what features from the early days of Linux have survived, an interesting read is Dennis Ritchie's reprint of the first UNIX programmer's manual (dated November 3, 1971). You can find it at Dennis Ritchie's website: www.bell-labs.com/usr/dmr/www/1stEdman.html. The form of this documentation is UNIX man pages, which is still the primary format for documenting UNIX and Linux operating system commands and programming tools today.

What's clear as you read through the early documentation and accounts of the UNIX system is that the development was a free-flowing process, lacked ego, and was dedicated to making UNIX excellent. This process led to a sharing of code (both inside and outside of Bell Labs), which allowed rapid development of a high-quality UNIX operating system. It also led to an operating system that AT&T would find difficult to reel back in later.

Commercial UNIX

Before the AT&T divestiture in 1984, when it was split up into AT&T and seven “Baby Bell” companies, AT&T was forbidden to sell computer systems with software. Companies that would later become Verizon, Qwest, Nokia, and Alcatel-Lucent were all part of AT&T. As a result of AT&T's monopoly of the telephone system, the US government was concerned that an unrestricted AT&T might dominate the fledgling computer industry.