Essential Commands
Daniel J. Barrett
Linux#
Pocket_Guide#
Network#
RAID#
Commands#
If you use Linux in your day-to-day work, then Linux Pocket Guide is the perfect on-the-job reference. This thoroughly updated 20th anniversary edition explains more than 200 Linux commands, including new commands for file handling, package management, version control, file format conversions, and more.
In this concise guide, author Daniel Barrett provides the most useful Linux commands grouped by functionality. Whether you're a novice or an experienced user, this practical book is an ideal reference for the most important Linux commands.
You'll learn:
Table of Contents
Chapter 1. Essential Concepts
Chapter 2. File Commands
Chapter 3. System Administration Basics
Chapter 4. Filesystem Maintenance
Chapter 5. Networking Commands
Chapter 6. Getting Stuff Done
First Things First
Welcome to Linux! If you’re a new user, this book can serve as a quick introduction, as well as a guide to common and practical commands. If you have Linux experience, feel free to skip the introductory material.
What’s in This Book?
This book is a short guide, not a comprehensive reference. I cover important, useful aspects of Linux so you can work productively. I do not, however, present every single command and every last option (my apologies if your favorite was omitted), nor delve into detail about operating system internals. Short, sweet, and essential—that’s our motto.
I focus on commands, those pesky little words you type on a command line to tell a Linux system what to do. Here’s an example command that counts lines of text in a file, myfile:
wc -l myfile
This book covers important Linux commands for most users, such as ls (list files), grep (search for text), mplayer (play audio and video files), and df (measure free disk space). I touch only briefly on graphical environments like GNOME and KDE Plasma, each of which could fill a Pocket Guide by itself.
I’ve organized the material by function to provide a concise learning path. For example, to help you view the contents of a file, I introduce many file-viewing commands together: cat for short text files, less for longer ones, od for binary files, and so on. Then I explain each command in turn, briefly presenting its common uses and options.
I assume you have access to a Linux system and can log in. If not, it’s easy to try out Linux on most computers. Just download and install a “live” Linux distribution onto a USB thumb drive and boot it. Examples are Ubuntu, Fedora, and KNOPPIX.
What’s New in the Fourth Edition?
New commands
I’ve added 50 new commands to this edition, such as git and svn for version control, split and column for text manipulation, pandoc and ffmpeg for file conversion, snap and flatpak for package management, mdadm, lvcreate, and zfs for fancy storage management, gpg for encryption, and many others.
Clearer organization
I’ve reorganized the book into chapters on concepts, files, basic system administration, networking, and other topics.
Goodbye, ancient commands
Some commands from previous editions of this book are mostly obsolete today, such as write and finger, or deprecated, such as ftp. I’ve replaced them with more relevant commands for modern Linux systems.
Daniel J. Barrett has been teaching and writing about Linux and related technologies for more than 30 years. He is an author of numerous O’Reilly books such as Efficient Linux at the Command Line, Linux Security Cookbook, SSH, The Secure Shell: The Definitive Guide, Macintosh Terminal Pocket Guide, and MediaWiki. Dan has also been a software engineer, heavy metal singer, system administrator, university lecturer, web designer, and humorist. He works at Google. Visit DanielJBarrett.com to learn more.