The Linux Command Line, 2nd Edition: A Complete Introduction

by: William Shotts (0)

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 (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.

The Reviews

I've been a professional Linux user, administrator, and developer for more than 20 years and I'm blown away by the perfect balance of essential and complex that this author has chosen. In fact, it has dissuaded me from writing my own. (I now plan on simply annotating it from my site. I run a mentored learning community focused on Linux, software development, and cybersecurity.)I was seriously surprised to find Associate Arrays in the scripting section, a Bash 4.0 feature that turns Bash into a full-blown scripting language.The author is also the only one I have ever read to cover the bc math tool and sub-language enabling solid math calculations consistently in any shell script.And the price?! OMG, that is so approachable. Learning Bash is far inferior to this book and costs almost twice as much.

Author William Shotts has done an amazing job with The Linux Command Line. I’ll admit I’m something of a Linux newbie, but I feel like I have learned so much from reading this book. The text is complex, yet approachable, and teaches lots of handy command line tips without being tied to a specific distro (though there is some brief discussion regarding packaging and package managers). Overall, a lot of useful content, both in using built-in programs and for coding your own shell scripts.The best part about this book, for me, were the “playground” lessons, where you would create a bunch of dummy files and folders and then perform operations on them. For example, using “touch” to create 10 folders with 100 files in each, with only one short line of code. Or showing how to use “grep” and “ls” to find all programs matching a particular pattern. Practical examples of using pipelines. These are all super useful. So lots of good example material here.The Linux Command Line clocks in at just over 500 pages, with 36 different chapters, each on a specific topic. The first 10 chapters explain how Linux works (permissions, processes, the environment), and how to use the command line in general (navigating the file tree, manipulating files and folders, redirection, command expansion and quoting). Next it covers package managers, connecting storage, networking, searching, archiving, regular expressions, formatting text, and printing. And the final part covers shell scripting and is a basic programming tutorial as well. A great base of content.I’ve only read a handful of Linux books so far, but I think I can say this is the best I’ve seen. The text covers very fundamental and core competencies for using Linux, and the language is very approachable for beginners. I feel like I have learned a lot and already I’m more comfortable on the command line. If you are new to Linux, this can be a great way to up your game. Recommended.

I have been trying to figure out how Linux works for a while, and most books will touch on a few of the important things. The other books I have read however usually don't go into the nitty gritty thinking people don't want to know that, or just assume they already do. While giving that deep level of knowledge this book also gives all the basics you could need while not assuming you know almost anything(there were a few spots that they kinda assumed you knew how some small things worked). I love this book, and would love too see a third edition that explains a little more with some more examples, like how to stop any expansion at all from happening.

I've been in Linux/UNIX over twenty years and this is the best written book on shell scripting and the UNIX environment I've ever seen. There are other good books on the subject to be sure but the author's skill to present the subject matter to both newcomers and experienced alike is sheer artistry. I bought it for my daughter to learn Linux and after she went through it, I ended up reading it and learning so much that I'm keeping it for myself as one of my goto references.

There was a time -- maybe 2005-12 -- when there were a lot of Linux books available. Now it's a trickle. This is a good one. It'll get you up to speed using the command line to manage your system and get things done. No Starch is probably the only publisher still doing Linux books like this, and I thank them for it.This and "How Linux Works" are both great books that every user should get.

Did not know anything about The Linux Command Line prior to reading this manual. Some of it can get pretty 'heady' for a novice, but if you push on through, Linux makes much more sense at the end of each chapter. Very helpful to have a PC in front of you to complete exercises while reading.

This book avoids long introductions in favor of getting directly into the learning process. I've tinkered with linux on and off and so Ive had an understanding of how to use commands, but not always why that command should be use. This book is quickly filling in important gaps in understanding for me, and beyond that I'm learning a lot of new things as well. This book is definitely worth its weight in gold to anyone who is serious about using and getting the most out of linux systems.

This book is written in such a way as to make difficult concepts simple. I was delighted to find a full chapter dedicated to vi. The material is dense, but perfectly written and illustrated. The author knows his stuff, and has the gift of writing well. I have recommended this to friends working in other sectors of IT (I work in network infrastructure and monitoring), and - for someone who is not well versed in Linux - I would recommend this book for anybody wanting to learn Linux. Very happy with my purchase, and very happy with this book. 5/5.

This book, along with online searches on related topics, accelerated my linux knowledge tremendously, more than any other book I have read so far. William Shotts discusses a lot of topics related to the linux command line, potentially intermediate users would find the book helpful as well.However, the biggest problem with the book is lack of practical examples and depth, I would rate this book 5 stars if the last parts of the book weren't so bad. For an example, he wants to show you how to use "sed" (a command for editing text documents without opening them) to replace forward slashes (/) with dashes (-) in a document with dates with this long and impossible to remember command:sed 's/\[0-9]\{2\}\)\/([0-9]\{2}\)\/\([0-9]\{4\}\)/\3-\1-\2/' document.txtwhen the exact same thing (i tested this because it's not an enormous pain in butt) can be accomplished with this:sed s/\//-/g document.txtAccording to shots, sed is worthless anyway because perl and awk are better, he gives NO explanation as to why! Plus, I was not happy with discussions on rsync and zip archive tools, after i used them both i had a lot of un-answered questions.This will give any computer enthusiast hours and hours of DIY entertainment, but don't buy this book if you're already very experienced with linux. I personally recommend finding free electronic books if you're trying to educate yourself in computers, also i don't recommend going to school for it because professors/teachers tend to explain technical jargon very poorly.

It is very well explained and detailed. I'm a windows user and this has help me a lot to understand the basics of linux. If you don't feel confident with the linux command line this will help for sure.

I actually had the first edition of this one and it was amazing so I picked up the second edition just to see what else they threw in it and to support NoStarch (they make the best books). I highly recommend this book to anyone who wants to learn about linux and BASH scripting. This is a really good resource to have at your disposal.

Liked everything about this book! I have some Linux background already this book help smoothen out the edges!

Thorough, detailed and to the point while also user friendly.

Gets the job done. Could be a bit more in depth, but I can google what is missing.

Even though this entire book is freely available as a pdf download, this is still worth the money if you like hard copies or you want to support the author. Highly recomended if you want to get into Linux.

The book came totally new and in good condition. it was so cheap.

The Linux Command Line, 2nd Edition: A Complete Introduction
⭐ 4.8 💛 1502
paperback: $18.48
Buy the Book