That’s part of an Twitter conversation I had with Cathy Malmrose of ZaReason. She makes a good point, and I bet the same could be said for people anywhere. In fact, I know several Linux users who are blissfully ignorant of the command line and still get a lot out of their distros.
But for some people (myself included), a knowledge of the command line, no matter how cursory, is indispensable. Time and time again the command line has either saved me time or saved my bacon — you might recall a recent example of that. It doesn’t take much to learn the basics of the command line or more than that. A good book helps.
One of the newest books on the block is The Linux Command Line by William E. Shotts, Jr. It’s a comprehensive guide to the command line that:
takes you from your very first terminal keystrokes to writing full programs in Bash, the most popular Linux shell
And the book succeeds, more of less, in taking you from zero knowledge of the command line to having a solid knowledge of the terminal.
Let’s take a closer look at the book.
Beginning at the beginning
The Linux Command Line does just that. It walks you through what the shell is, how to enter commands, and how to end a terminal session. You’d be surprised (or not) at how many people don’t know how to do the latter …
From there, you learn how to navigate and explore the file system using commands like cd (for changing directories), ls (for listing the contents of directories), and pwd (for viewing the name of the directory you’re currently in). In explaining those commands, Schotts also offers some good explanations of the structure of the Linux filesystem and of absolute and relative paths. I can’t tell you how many people I know who still mix those up.
Going a bit deeper
Once you can comfortably move around, Schotts teaches you how to copy and move files as well as how to rename them and create symbolic links. But Schotts isn’t just teaching you the commands. He’s also giving you a chance to not only use the commands, but also use some of the features of the command line with those commands.
Like what? For example, using the trailing period (shorthand for the current directory) when copying or moving files and exposing you to wildcards and useful options for the commands that you’re learning.
A chapter I found particularly useful was the one covering redirection. That explained how to change the destination of the output from some common commands like grep, wc (for counting words in a file), and cat (for combining files). While I have used redirection in the past, my skills with it are a bit rusty. The chapter in this book was a good refresher.
Once, someone told me that he’d be unsure of using Linux because (among other things) he didn’t understand the environment — the stored configuration information for the system. Funny that he didn’t understand it on Windows, either … The Linux Command Line spends about 10 pages examining the environment; from what information it stores to what and how to modify.
There is some information in the book that people with a little more knowledge of the command line will find useful, such as the chapters or sections that cover how to create aliases, networking, package managers, using storage media (like USB drives), and searching for files.
On the other hand …
There were a few things that I glossed over or that fell flat for me in The Linux Command Line. For example, there was a section explaining how to determine the type of command that you’re using. I’ve never found that useful, and the book didn’t convince me otherwise. The chapter on advanced keyboard tricks was fine, but again I didn’t find it all that useful. Your mileage may vary.
I found the book to be a bit long. It weighs in at 482 pages. There is a bit too much detail at times; I like things a bit shorter and more concise. Again, your mileage may vary.
You might find the section on writing shell scripts — which takes up almost a third of the book — useful. I felt it was a both a bit long and a bit rushed. The section felt like it had been tacked on. I think it would have worked better as a separate book.
The Linux Command Line is, for the most part, for the command line novice. And, overall, it’s a does a good job of introducing the command line to someone who is unfamiliar and, possibly, intimidated by it to a level of mastery. Or, if nothing else, familiarity.
Overall, The Linux Command Line is a solid and comprehensive introduction to the subject. While it does go on a bit long for my tastes, the book does pack a lot of useful information. If you’re new to the command line there is definitely a lot that you can learn from this book.
This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.