Close Modal

The Linux Command Line, 3rd Edition

A Complete Introduction

Paperback
$49.99 US
7"W x 9-1/4"H (17.8 x 23.5 cm) | 13 oz (369 g) | 24 per carton
On sale Feb 03, 2026 | 504 Pages | 9781718504523
Sales rights: World

The Linux Command Line, 3rd Edition pages 48-49
The Linux Command Line, 3rd Edition pages 92-93
The Linux Command Line, 3rd Edition pages 166-167
You've experienced the shiny, point-and-click surface of your Linux computer—now dive below and explore its depths with the power of the command line.

The Linux command line isn’t a relic of the past—it’s the key to real computing power. With it, you can take control of your system, automate tedious tasks, and understand exactly what your computer is doing.

That’s why more than 150,000 readers have turned to The Linux Command Line. Now in its third edition, this best-selling guide has been fully updated with nearly 40 pages of new material, modernized examples, and downloadable scripts from LinuxCommand.org.

Everything you need to know about a command is in the man pages—and they’re an extraordinary resource. But they’re not always the fastest way to learn. When you just want to use a new command, or squeeze more power out of an old favorite, it helps to have an expert  guide you along. That’s what William Shotts does in this book: he shows you not just what a command does, but how to make it work magic for you. Think of Shotts at your side saying: “Watch this. Here’s how you really use it.” Suddenly, you’ve got superhuman strength at the terminal.

You’ll discover how to:
  • Navigate the filesystem, create and manage files, and configure your environment
  • Chain commands, redirect input/output, and wield regular expressions
  • Administer processes, install packages, and work with networking tools
  • Edit files with Vim, the classic Unix text editor
  • Write shell scripts to automate tasks and build your own tools
  • Harness powerful utilities like grep, cut, sed, and tar to process text and data
  • Manage filesystems and storage devices
  • Compile programs from source code

Shotts writes with rare clarity and a touch of humor, making even complex concepts approachable and practical. Whether you’re migrating from another platform, managing servers, or hacking on a Raspberry Pi, this book will change the way you interact with your computer.

Just don’t be surprised if your mouse starts to gather dust.
"It trains you to think like the system thinks---not just run commands until something works."
—LinuxSecurity.com

"Thorough and approachable. A great resource for those new to Linux and for seasoned Linux veterans wanting to dive deeper."
—Philip Polstra, PhD, author of Linux Forensics

Praise for The Linux Command Line, 2nd Edition:

"This excellent Linux command line book is more than cubicle decoration, it's a secret super power."
—Ken Hess, Red Hat

"For those looking to master the Linux command line and get an essential understand of the core Linux command line tools, this book is a highly effective and useful guide."—Ben Rothke, RSA Conference

"I can honestly say I have found THE beginner's guide to Linux."
—Jayson Broughton, Linux Journal

"This is exactly what a Linux beginner needs to get up to speed quickly. The book goes beyond simply walking through all of the command line utilities, and ventures into the realm of theory and how things work together."
—Nicholas C. Zakas, Yahoo!

"The most approachable tome on the subject."
—Federico Lucifredi, Linux Magazine
William Shotts has been a software professional for more than 40 years and a dedicated Linux user and advocate since 1996. Over his career he’s worked as a programmer, teacher, photographer, and technical manager leading teams in customer support, software quality assurance, system administration, and documentation. He is also the creator of Linux Command, a long-running site that helps users master the Linux command line.
Available for sale exclusive:
•     Afghanistan
•     Aland Islands
•     Albania
•     Algeria
•     Andorra
•     Angola
•     Anguilla
•     Antarctica
•     Antigua/Barbuda
•     Argentina
•     Armenia
•     Aruba
•     Australia
•     Austria
•     Azerbaijan
•     Bahamas
•     Bahrain
•     Bangladesh
•     Barbados
•     Belarus
•     Belgium
•     Belize
•     Benin
•     Bermuda
•     Bhutan
•     Bolivia
•     Bonaire, Saba
•     Bosnia Herzeg.
•     Botswana
•     Bouvet Island
•     Brazil
•     Brit.Ind.Oc.Ter
•     Brit.Virgin Is.
•     Brunei
•     Bulgaria
•     Burkina Faso
•     Burundi
•     Cambodia
•     Cameroon
•     Canada
•     Cape Verde
•     Cayman Islands
•     Centr.Afr.Rep.
•     Chad
•     Chile
•     China
•     Christmas Islnd
•     Cocos Islands
•     Colombia
•     Comoro Is.
•     Congo
•     Cook Islands
•     Costa Rica
•     Croatia
•     Cuba
•     Curacao
•     Cyprus
•     Czech Republic
•     Dem. Rep. Congo
•     Denmark
•     Djibouti
•     Dominica
•     Dominican Rep.
•     Ecuador
•     Egypt
•     El Salvador
•     Equatorial Gui.
•     Eritrea
•     Estonia
•     Ethiopia
•     Falkland Islnds
•     Faroe Islands
•     Fiji
•     Finland
•     France
•     Fren.Polynesia
•     French Guinea
•     Gabon
•     Gambia
•     Georgia
•     Germany
•     Ghana
•     Gibraltar
•     Greece
•     Greenland
•     Grenada
•     Guadeloupe
•     Guam
•     Guatemala
•     Guernsey
•     Guinea Republic
•     Guinea-Bissau
•     Guyana
•     Haiti
•     Heard/McDon.Isl
•     Honduras
•     Hong Kong
•     Hungary
•     Iceland
•     India
•     Indonesia
•     Iran
•     Iraq
•     Ireland
•     Isle of Man
•     Israel
•     Italy
•     Ivory Coast
•     Jamaica
•     Japan
•     Jersey
•     Jordan
•     Kazakhstan
•     Kenya
•     Kiribati
•     Kuwait
•     Kyrgyzstan
•     Laos
•     Latvia
•     Lebanon
•     Lesotho
•     Liberia
•     Libya
•     Liechtenstein
•     Lithuania
•     Luxembourg
•     Macau
•     Macedonia
•     Madagascar
•     Malawi
•     Malaysia
•     Maldives
•     Mali
•     Malta
•     Marshall island
•     Martinique
•     Mauritania
•     Mauritius
•     Mayotte
•     Mexico
•     Micronesia
•     Minor Outl.Ins.
•     Moldavia
•     Monaco
•     Mongolia
•     Montenegro
•     Montserrat
•     Morocco
•     Mozambique
•     Myanmar
•     Namibia
•     Nauru
•     Nepal
•     Netherlands
•     New Caledonia
•     New Zealand
•     Nicaragua
•     Niger
•     Nigeria
•     Niue
•     Norfolk Island
•     North Korea
•     North Mariana
•     Norway
•     Oman
•     Pakistan
•     Palau
•     Palestinian Ter
•     Panama
•     PapuaNewGuinea
•     Paraguay
•     Peru
•     Philippines
•     Pitcairn Islnds
•     Poland
•     Portugal
•     Puerto Rico
•     Qatar
•     Reunion Island
•     Romania
•     Russian Fed.
•     Rwanda
•     S. Sandwich Ins
•     Saint Martin
•     Samoa,American
•     San Marino
•     SaoTome Princip
•     Saudi Arabia
•     Senegal
•     Serbia
•     Seychelles
•     Sierra Leone
•     Singapore
•     Sint Maarten
•     Slovakia
•     Slovenia
•     Solomon Islands
•     Somalia
•     South Africa
•     South Korea
•     South Sudan
•     Spain
•     Sri Lanka
•     St Barthelemy
•     St. Helena
•     St. Lucia
•     St. Vincent
•     St.Chr.,Nevis
•     St.Pier,Miquel.
•     Sth Terr. Franc
•     Sudan
•     Suriname
•     Svalbard
•     Swaziland
•     Sweden
•     Switzerland
•     Syria
•     Tadschikistan
•     Taiwan
•     Tanzania
•     Thailand
•     Timor-Leste
•     Togo
•     Tokelau Islands
•     Tonga
•     Trinidad,Tobago
•     Tunisia
•     Turkey
•     Turkmenistan
•     Turks&Caicos Is
•     Tuvalu
•     US Virgin Is.
•     USA
•     Uganda
•     Ukraine
•     Unit.Arab Emir.
•     United Kingdom
•     Uruguay
•     Uzbekistan
•     Vanuatu
•     Vatican City
•     Venezuela
•     Vietnam
•     Wallis,Futuna
•     West Saharan
•     Western Samoa
•     Yemen
•     Zambia
•     Zimbabwe

Acknowledgements
Introduction

Part I: Learning the Shell
Chapter 1: What Is the Shell?
Chapter 2: Navigation
Chapter 3: Exploring the System
Chapter 4: Manipulating Files and Directories
Chapter 5: Working with Commands
Chapter 6: Redirection
Chapter 7: Seeing the World as the Shell Sees It
Chapter 8: Advanced Keyboard Tricks
Chapter 9: Permissions
Chapter 10: Processes

Part II: Configuration and the Environment
Chapter 11: The Environment
Chapter 12: A Gentle Introduction to vi(m)
Chapter 13: Customizing the Prompt

Part III: Common Tasks and Essential Tools
Chapter 14: Package Management
Chapter 15: Storage Media
Chapter 16: Networking
Chapter 17: Searching for Files
Chapter 18: Archiving and Backup
Chapter 19: Regular Expressions
Chapter 20: Text Processing
Chapter 21: Formatting Output
Chapter 22: Printing
Chapter 23: Compiling Programs

Part IV: Writing Shell Scripts
Chapter 24: Writing Your First Script
Chapter 25: Starting a Project
Chapter 26: Top-Down Design
Chapter 27: Flow Control: Branching with if
Chapter 28: Reading Keyboard Input
Chapter 29: Flow Control: Looping with while/until
Chapter 30: Troubleshooting
Chapter 31: Flow Control: Branching with case
Chapter 32: Positional Parameters
Chapter 33: Flow Control: Looping with for
Chapter 34: Strings and Numbers
Chapter 35: Arrays
Chapter 36: Exotica

Index

Photos

The Linux Command Line, 3rd Edition pages 48-49
The Linux Command Line, 3rd Edition pages 92-93
The Linux Command Line, 3rd Edition pages 166-167

About

You've experienced the shiny, point-and-click surface of your Linux computer—now dive below and explore its depths with the power of the command line.

The Linux command line isn’t a relic of the past—it’s the key to real computing power. With it, you can take control of your system, automate tedious tasks, and understand exactly what your computer is doing.

That’s why more than 150,000 readers have turned to The Linux Command Line. Now in its third edition, this best-selling guide has been fully updated with nearly 40 pages of new material, modernized examples, and downloadable scripts from LinuxCommand.org.

Everything you need to know about a command is in the man pages—and they’re an extraordinary resource. But they’re not always the fastest way to learn. When you just want to use a new command, or squeeze more power out of an old favorite, it helps to have an expert  guide you along. That’s what William Shotts does in this book: he shows you not just what a command does, but how to make it work magic for you. Think of Shotts at your side saying: “Watch this. Here’s how you really use it.” Suddenly, you’ve got superhuman strength at the terminal.

You’ll discover how to:
  • Navigate the filesystem, create and manage files, and configure your environment
  • Chain commands, redirect input/output, and wield regular expressions
  • Administer processes, install packages, and work with networking tools
  • Edit files with Vim, the classic Unix text editor
  • Write shell scripts to automate tasks and build your own tools
  • Harness powerful utilities like grep, cut, sed, and tar to process text and data
  • Manage filesystems and storage devices
  • Compile programs from source code

Shotts writes with rare clarity and a touch of humor, making even complex concepts approachable and practical. Whether you’re migrating from another platform, managing servers, or hacking on a Raspberry Pi, this book will change the way you interact with your computer.

Just don’t be surprised if your mouse starts to gather dust.

Praise

"It trains you to think like the system thinks---not just run commands until something works."
—LinuxSecurity.com

"Thorough and approachable. A great resource for those new to Linux and for seasoned Linux veterans wanting to dive deeper."
—Philip Polstra, PhD, author of Linux Forensics

Praise for The Linux Command Line, 2nd Edition:

"This excellent Linux command line book is more than cubicle decoration, it's a secret super power."
—Ken Hess, Red Hat

"For those looking to master the Linux command line and get an essential understand of the core Linux command line tools, this book is a highly effective and useful guide."—Ben Rothke, RSA Conference

"I can honestly say I have found THE beginner's guide to Linux."
—Jayson Broughton, Linux Journal

"This is exactly what a Linux beginner needs to get up to speed quickly. The book goes beyond simply walking through all of the command line utilities, and ventures into the realm of theory and how things work together."
—Nicholas C. Zakas, Yahoo!

"The most approachable tome on the subject."
—Federico Lucifredi, Linux Magazine

Author

William Shotts has been a software professional for more than 40 years and a dedicated Linux user and advocate since 1996. Over his career he’s worked as a programmer, teacher, photographer, and technical manager leading teams in customer support, software quality assurance, system administration, and documentation. He is also the creator of Linux Command, a long-running site that helps users master the Linux command line.

Rights

Available for sale exclusive:
•     Afghanistan
•     Aland Islands
•     Albania
•     Algeria
•     Andorra
•     Angola
•     Anguilla
•     Antarctica
•     Antigua/Barbuda
•     Argentina
•     Armenia
•     Aruba
•     Australia
•     Austria
•     Azerbaijan
•     Bahamas
•     Bahrain
•     Bangladesh
•     Barbados
•     Belarus
•     Belgium
•     Belize
•     Benin
•     Bermuda
•     Bhutan
•     Bolivia
•     Bonaire, Saba
•     Bosnia Herzeg.
•     Botswana
•     Bouvet Island
•     Brazil
•     Brit.Ind.Oc.Ter
•     Brit.Virgin Is.
•     Brunei
•     Bulgaria
•     Burkina Faso
•     Burundi
•     Cambodia
•     Cameroon
•     Canada
•     Cape Verde
•     Cayman Islands
•     Centr.Afr.Rep.
•     Chad
•     Chile
•     China
•     Christmas Islnd
•     Cocos Islands
•     Colombia
•     Comoro Is.
•     Congo
•     Cook Islands
•     Costa Rica
•     Croatia
•     Cuba
•     Curacao
•     Cyprus
•     Czech Republic
•     Dem. Rep. Congo
•     Denmark
•     Djibouti
•     Dominica
•     Dominican Rep.
•     Ecuador
•     Egypt
•     El Salvador
•     Equatorial Gui.
•     Eritrea
•     Estonia
•     Ethiopia
•     Falkland Islnds
•     Faroe Islands
•     Fiji
•     Finland
•     France
•     Fren.Polynesia
•     French Guinea
•     Gabon
•     Gambia
•     Georgia
•     Germany
•     Ghana
•     Gibraltar
•     Greece
•     Greenland
•     Grenada
•     Guadeloupe
•     Guam
•     Guatemala
•     Guernsey
•     Guinea Republic
•     Guinea-Bissau
•     Guyana
•     Haiti
•     Heard/McDon.Isl
•     Honduras
•     Hong Kong
•     Hungary
•     Iceland
•     India
•     Indonesia
•     Iran
•     Iraq
•     Ireland
•     Isle of Man
•     Israel
•     Italy
•     Ivory Coast
•     Jamaica
•     Japan
•     Jersey
•     Jordan
•     Kazakhstan
•     Kenya
•     Kiribati
•     Kuwait
•     Kyrgyzstan
•     Laos
•     Latvia
•     Lebanon
•     Lesotho
•     Liberia
•     Libya
•     Liechtenstein
•     Lithuania
•     Luxembourg
•     Macau
•     Macedonia
•     Madagascar
•     Malawi
•     Malaysia
•     Maldives
•     Mali
•     Malta
•     Marshall island
•     Martinique
•     Mauritania
•     Mauritius
•     Mayotte
•     Mexico
•     Micronesia
•     Minor Outl.Ins.
•     Moldavia
•     Monaco
•     Mongolia
•     Montenegro
•     Montserrat
•     Morocco
•     Mozambique
•     Myanmar
•     Namibia
•     Nauru
•     Nepal
•     Netherlands
•     New Caledonia
•     New Zealand
•     Nicaragua
•     Niger
•     Nigeria
•     Niue
•     Norfolk Island
•     North Korea
•     North Mariana
•     Norway
•     Oman
•     Pakistan
•     Palau
•     Palestinian Ter
•     Panama
•     PapuaNewGuinea
•     Paraguay
•     Peru
•     Philippines
•     Pitcairn Islnds
•     Poland
•     Portugal
•     Puerto Rico
•     Qatar
•     Reunion Island
•     Romania
•     Russian Fed.
•     Rwanda
•     S. Sandwich Ins
•     Saint Martin
•     Samoa,American
•     San Marino
•     SaoTome Princip
•     Saudi Arabia
•     Senegal
•     Serbia
•     Seychelles
•     Sierra Leone
•     Singapore
•     Sint Maarten
•     Slovakia
•     Slovenia
•     Solomon Islands
•     Somalia
•     South Africa
•     South Korea
•     South Sudan
•     Spain
•     Sri Lanka
•     St Barthelemy
•     St. Helena
•     St. Lucia
•     St. Vincent
•     St.Chr.,Nevis
•     St.Pier,Miquel.
•     Sth Terr. Franc
•     Sudan
•     Suriname
•     Svalbard
•     Swaziland
•     Sweden
•     Switzerland
•     Syria
•     Tadschikistan
•     Taiwan
•     Tanzania
•     Thailand
•     Timor-Leste
•     Togo
•     Tokelau Islands
•     Tonga
•     Trinidad,Tobago
•     Tunisia
•     Turkey
•     Turkmenistan
•     Turks&Caicos Is
•     Tuvalu
•     US Virgin Is.
•     USA
•     Uganda
•     Ukraine
•     Unit.Arab Emir.
•     United Kingdom
•     Uruguay
•     Uzbekistan
•     Vanuatu
•     Vatican City
•     Venezuela
•     Vietnam
•     Wallis,Futuna
•     West Saharan
•     Western Samoa
•     Yemen
•     Zambia
•     Zimbabwe

Table of Contents

Acknowledgements
Introduction

Part I: Learning the Shell
Chapter 1: What Is the Shell?
Chapter 2: Navigation
Chapter 3: Exploring the System
Chapter 4: Manipulating Files and Directories
Chapter 5: Working with Commands
Chapter 6: Redirection
Chapter 7: Seeing the World as the Shell Sees It
Chapter 8: Advanced Keyboard Tricks
Chapter 9: Permissions
Chapter 10: Processes

Part II: Configuration and the Environment
Chapter 11: The Environment
Chapter 12: A Gentle Introduction to vi(m)
Chapter 13: Customizing the Prompt

Part III: Common Tasks and Essential Tools
Chapter 14: Package Management
Chapter 15: Storage Media
Chapter 16: Networking
Chapter 17: Searching for Files
Chapter 18: Archiving and Backup
Chapter 19: Regular Expressions
Chapter 20: Text Processing
Chapter 21: Formatting Output
Chapter 22: Printing
Chapter 23: Compiling Programs

Part IV: Writing Shell Scripts
Chapter 24: Writing Your First Script
Chapter 25: Starting a Project
Chapter 26: Top-Down Design
Chapter 27: Flow Control: Branching with if
Chapter 28: Reading Keyboard Input
Chapter 29: Flow Control: Looping with while/until
Chapter 30: Troubleshooting
Chapter 31: Flow Control: Branching with case
Chapter 32: Positional Parameters
Chapter 33: Flow Control: Looping with for
Chapter 34: Strings and Numbers
Chapter 35: Arrays
Chapter 36: Exotica

Index