The Linux Command Line: A Complete Introduction (Paperback)

William E. Shotts Jr.



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 takes you from your very first terminal keystrokes to writing full programs in Bash, the most popular Linux shell. Along the way you'll learn the timeless skills handed down by generations of gray-bearded, 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.


你已經體驗過 Linux 電腦的華麗、點擊式界面,現在讓我們深入探索它的深處,利用命令列的力量。

《Linux 命令列》將帶領你從你的第一個終端機按鍵開始,一直到在 Bash 中編寫完整的程式,Bash 是最受歡迎的 Linux shell。在這過程中,你將學習到由一代又一代的灰鬚、拒絕使用滑鼠的大師們傳承下來的永恆技能:文件導航、環境配置、命令鏈接、正則表達式模式匹配等等。

除了實用知識外,作者 William Shotts 還揭示了這些工具背後的哲學,以及你的桌面 Linux 機器從古老的 Unix 超級計算機中繼承的豐富遺產。


- 創建和刪除文件、目錄和符號鏈接
- 管理系統,包括網絡、軟件包安裝和進程管理
- 使用標準輸入和輸出、重定向和管道
- 使用 Vi 編輯器編輯文件,Vi 是世界上最受歡迎的文本編輯器
- 編寫 shell 腳本以自動執行常見或乏味的任務
- 使用 cut、paste、grep、patch 和 sed 等工具對文本文件進行切割和處理

一旦你克服了最初的「shell shock」,你會發現命令列是一種自然而表達力強的與電腦溝通的方式。只是不要驚訝,如果你的滑鼠開始積灰。