The Linux Command Line takes you from your very first terminal keystrokes to writing full programs in Bash, the most popular Linux shell (or command line). Along the way you'll learn the timeless skills handed down by generations of experienced, mouse-shunning gurus: file navigation, environment configuration, command chaining, pattern matching with regular expressions, and more.
In addition to that practical knowledge, author William Shotts reveals the philosophy behind these tools and the rich heritage that your desktop Linux machine has inherited from Unix supercomputers of yore.
As you make your way through the book's short, easily-digestible chapters, you'll learn how to:
- Create and delete files, directories, and symlinks
- Administer your system, including networking, package installation, and process management
- Use standard input and output, redirection, and pipelines
- Edit files with Vi, the world's most popular text editor
- Write shell scripts to automate common or boring tasks
- Slice and dice text files with cut, paste, grep, patch, and sed
Once you overcome your initial "shell shock," you'll find that the command line is a natural and expressive way to communicate with your computer. Just don't be surprised if your mouse starts to gather dust.
This open book is licensed under a Creative Commons License (CC BY-NC-ND). You can download The Linux Command Line ebook for free in PDF format (2.2 MB).
Table of Contents
Learning the Shell
What Is the Shell?
Exploring the System
Manipulating Files and Directories
Working with Commands
Seeing the World as the Shell Sees It
Advanced Keyboard Tricks
Configuration and the Environment
A Gentle Introduction to vi
Customizing the Prompt
Common Tasks and Essential Tools
Searching for Files
Archiving and Backup
Writing Shell Scripts
Writing Your First Script
Starting a Project
Flow Control: Branching with if
Reading Keyboard Input
Flow Control: Looping with while / until
Flow Control: Branching with case
Flow Control: Looping with for
Strings and Numbers