Jump to ratings and reviews
Rate this book

The Linux Command Line: A Complete Introduction

Rate this book
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.

502 pages, Kindle Edition

First published January 7, 2012

922 people are currently reading
3641 people want to read

About the author

William E. Shotts Jr.

1 book18 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
883 (52%)
4 stars
611 (36%)
3 stars
165 (9%)
2 stars
29 (1%)
1 star
6 (<1%)
Displaying 1 - 30 of 156 reviews
Profile Image for Neal Aggarwal.
72 reviews13 followers
December 15, 2012
from the book ... captures why one should invest some time in learning Linux

LINUX IS ABOUT IMAGINATION

When I am asked to explain the difference between Windows and Linux, I often use a toy analogy.

Windows is like a Game Boy. You go to the store and buy one all shiny new in the box. You take it home, turn it on, and play with it. Pretty graphics, cute sounds. After a while, though, you get tired of the game that came with it, so you go back to the store and buy another one. This cycle repeats over and over. Finally, you go back to the store and say to the person behind the counter, “I want a game that does this!” only to be told that no such game exists because there is no “market demand” for it. Then you say, “But I only need to change this one thing!” The person behind the counter says you can’t change it. The games are all sealed up in their cartridges. You discover that your toy is limited to the games that others have decided that you need and no more.

Linux, on the other hand, is like the world’s largest Erector Set. You open it up, and it’s just a huge collection of parts—a lot of steel struts, screws, nuts, gears, pulleys, and motors and a few suggestions on what to build. So you start to play with it. You build one of the suggestions and then another. After a while you discover that you have your own ideas of what to make. You don’t ever have to go back to the store, because you already have everything you need. The Erector Set takes on the shape of your imagination. It does what you want.

Your choice of toys is, of course, a personal thing, so which toy would you find more satisfying?
Profile Image for Stephen Clynes.
632 reviews39 followers
November 27, 2012
This book is not a novel but a computer manual. It is available as a free 2,009 KB PDF download from the Linux Command website and was published in 2009. This book shows how Linux from the command line actually works behind the scenes. It gives a full explanation of how Linux works and the history of computer operating from the birth of Unix. It explores the reasoning behind Unix and you begin to understand exactly how computers work with this great tale of logic. William writes a lovely background and history of computer operating techniques, theory and best practice. He illustrates the power, efficency and beauty of working from the command line. This book entertains as you discover the bash shell. The text works very well as a book and it gave me the same reading pleasure as I get from a regular novel.

This book is not dull but it is lively and thought provoking. At the end of this book you wonder if you would ever miss a graphical user interface now that William has shown you the other way, which is Linux at the command line. You can always refer back to this book and use it as a reference. It was such an enjoyable read that I will vote it the maximum score of 5 stars. The Linux Command Line is a good adventure that makes you wonder about all the bloat with Microsoft Windows.
Profile Image for Bokieie.
14 reviews17 followers
September 2, 2019
This book is the only way to go! Any OTHER book just tells you what to do, this book teaches it to you in an entertaining way.
Profile Image for Qureshi.
4 reviews108 followers
December 3, 2015
A couple of hours read. Simple and direct. Not recommended to anyone already familiar with Bash. However, it's a fun read.
Profile Image for وليد تاج الدين.
41 reviews11 followers
April 11, 2014
الكتاب سهل الإسلوب للغاية، لن تحقق الفائدة المرجوة منه ما لم تقم بالتجربة أثناء القرائة. الكتاب يشرح كيفية التعامل مع طرفية نظام التشغيل لينكس كما يتطرق لبعض المواضيع الخاصة بالبرمجة بوجه عام. أتمنى أن تتم ترجمة هذا الكتاب للغة العربية لتعم المنفعة به.
Profile Image for Den Ponsky.
7 reviews9 followers
November 3, 2019
Many good points in this book. Not all of them were applicable to my software development experience.
Profile Image for Ahmed Shahwan.
39 reviews29 followers
March 21, 2016
الكتاب ده روعة، ومن أفضل الكتب اللي ممكن تقراها عشان تفهم لينكس كويس.
ميزة الكتاب إنه عملي جداً وفيه أمثلة ممكن تستخدمها كتير بعد كده.
الشرح الموجود فيه واف في معظم الأحيان وكاف.

بعد ما تخلص الكتاب ده وتطبق كل اللي فيه، هتكون فهمت أساسيات تخليك تقدر تكمل في أي كورس أو كتاب تاني ليه علاقة بلينكس لو ناوي تكمل في مجال يعني مرتبط بلينكس.

عيب في الكتاب إن فيه بعض الأمثلة الصعبة إلى حد ما، وليست مشروحة كما يجب.
وبرده أحياناً بيعدي حاجات كده مش بيشرحها شرح واف، ولو مش عارفها قبل كده ممكن تتوه فيها شوية. فهتحتاج تبحث منها غالباً.
Profile Image for Roy Klein.
91 reviews14 followers
March 6, 2013
The first 30% of the book transformed me from a bash ignoramus to someone who always has a trick up his sleeve to get something done on it, and if the book ended there I'd still give it 5 stars.

It continues though, to delve into more advanced topics that at the moment are beyond my need. I've read 50% into the book, and for now putting it aside until the need arises. I'm sure it'll come in handy in the future.
Profile Image for Lucas.
160 reviews31 followers
December 16, 2020
Eu uso linux há quase três anos e desde que comecei sempre resolvia meus problemas dando um google. Minha ideia ao pegar esse livro foi ter uma visão mais sistemática do Linux e entender melhor o sentido de alguns comandos. Funcionou bem para mim, mas tenho muito o que aprender.

Recomendo para todo mundo que seja um novo usuário de Linux ou que nunca parou para estudar mais detidamente alguns comandos e o sistema de arquivos. Livro é acessível para iniciantes e está bem organizado.
Profile Image for Hidde Tieleman.
24 reviews
September 18, 2021
The Linux Command Line
William E. Shotts Jr.

Introduction

As the title of the book already reveals this is a tech book where you’ll discover the utilization of the Linux command line. The command line isn’t a standalone tool though, but just a means to an end and that’s actually administering your Linux distro. It doesn’t matter whether you’re a hobbyist or an (aspiring) IT professional.
Personally I’ve worked with Linux quite some time and I’ve had some knowledge about some parts of the OS before I started this book.
Yet it felt like I was missing out on a lot of capabilities of the OS in my all day life as an IT professional. So I’ve been on the lookout for a book that could offer me like an all-encompassing overview. Later on I reveal whether this book will meet my expectations or not.

Author

The author goes by the name of William E. Jr. Shotts and has definitely earned his stripes in the Linux community. This is his bio in a nutshell:

“William E. Shotts, Jr. has been a software professional and avid Linux user for more than 15 years. He has an extensive background in software development, including technical support, quality assurance, and documentation. He is also the creator of LinuxCommand.org, a Linux education and advocacy site featuring news, reviews, and extensive support for using the Linux command line.”

You might have a look at his accompanying website here: http://linuxcommand.org/index.php

About the book

The official summary reflects more than enough where this book is about:

“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).”

This description captures really good where this book stands for. You might expect that the start of the book would be boring if you already have some basic knowledge about Linux like me. However nothing is less true. The author has a legit appealing style of writing where he manages to attract and moreover keeps your attention for an extended period of time.

I enjoyed the extreme high practical examples and all the concepts that has been passed by from A to Z. You won’t find tedious blocks of text anywhere in this book. Instead you’ll find short and easy digestible chapters, where snippets of code are explained really thoroughly. On top of that the author provides you with background information about the rich Unix history and the origin of commands.
So what do you learn specifically? That’s also described really concise and truthful in the official summary of No Starch Press:

' 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”


These topics are actually only scratched on the surface and the author doesn’t go on and on on about certain concepts till you’re bored to death. Instead he just shows you the basis of a concept. At the end of each short chapter you’ll find references from the author with more detailed descriptions if you’ll find yourself particularly interested in the topic at hand.

Conclusion

After going through this book I’ve definitely reached my goal to hone my Linux skills tremendously. In a matter of fact I think that this book might be a stepping stone to transform you from a Unix/Linux zero to a hero. I choose the word stepping stone deliberately, cause you can’t be a hero by reading only one book on a topic. Albeit this book might spark an interest in you to dive in Linux much deeper and get closer to be Unix hero over time ;)

Recommendation

This book is already interesting if you have a mild interest in the Unix/Linux OS, cause the writing style is extremely low-key and accessible. As said, if the book isn’t in-depth enough for you, it may be always used as a stepping stone to get into more detailed resources.
But you will absolutely attain a high overview of the Linux OS after going through it, period.

P.S. I’ve gone through the free PDF book, that you might download here https://sourceforge.net/projects/linu...
That’s been fine for me, but you might get a paperback somewhere from Amazon, if you really like to work from hard cover books. It’s impossible to spend a penny too much on this book in any case.

Rating 5/5
Profile Image for Sato.
52 reviews13 followers
February 23, 2020
This book presents a full explanation of how to work with bash, and if you're already a Linux/Unix user, you can pick small details that are increasing your performance in coding and if you're not familiar with Linux, it can be a great tool which explains everything from scratch.

Another interesting part of this book is to show you the Unix way of thinking, which is different from the Windows way of thinking. Linux is not just a piece of software; it’s also a small part of the larger Unix culture, which has its own language and history.
Profile Image for ron btdtbttsawio.
55 reviews10 followers
July 19, 2020
This is mostly a good book on the command line but there were some sections I couldn't follow. I bailed out of the last section about scripting as I couldn't follow it at all. I think the author was trying to cram in too much content. It would have been better if he stuck with the command line and wrote a separate book on scripting so he could explore the topics in a more thorough manner.
Profile Image for Railgun.
21 reviews
July 11, 2020
A good refresh of our most loved CLIs!

It would be even better if the author includes samples of most commonly used command with their options.

2 reviews
February 9, 2021
Clear and comprehensive introduction to the shell. Aimed at beginners but proved interesting and worth reading nonetheless. -1 star for bashism.
Profile Image for Vỹ Hồng.
88 reviews36 followers
November 11, 2019
I've been using bash for a while, without actually learning the basics. So, I planned to skim through this book to cover my knowledge gaps. However, after a few chapters, my interest with the subject grew much larger and I started reading the whole text. Needless to say, I really enjoyed my time reading this.

The book is a very good introduction to bash and linux concepts. The author explains concepts clearly and the examples are really really well made. It also includes lots of "extras" about why things are the way they are (hint: mostly for historical reasons).

Overall, I'd recommend this book if you're starting to learn linux and bash, or would like to get some formal introduction to the topics after years of searching "how do I .. in bash"?
Profile Image for Ben Rothke.
347 reviews46 followers
April 12, 2019
An interesting observation William Shotts makes at the beginning of the 2nd edition of The Linux Command Line: A Complete Introduction, is that in all of the hacking movies, one never sees the hacker using a mouse. From The Matrix to Takedown, the hackers are invariably busy at the command line. He writes that we as human beings instinctively know that the only way to really get anything done on a computer is by typing it on a keyboard.

To that end, The Linux Command Line is meant to help the Linux user master the powerful art of the command line. This most effective guide provides a step by step compendium to getting complete control over how to use Linux. He take a very procedural approach, and starts with the core set of commands, and leads the reader to writing their own scripts.

Rather than just listing all of the Linux commands and their syntax, which one could freely get via the man page, Shotts also details real word usage of these commands, and the overarching Linux philosophy.

For many Windows and Macintosh uses, the use of the command prompt is almost a foreign language to them. For Linux users, it is a powerful way to make the most out of the system, and not be a slave to the mouse.

For those looking to master the Linux command line and get an essential understand of the core Linux command line tools, this book is a highly effective and useful guide.
Profile Image for Hugh Smalley.
48 reviews
September 14, 2016

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.



Designed for the new command line user, this 522-page volume covers the same material as LinuxCommand.org but in much greater detail. In addition to the basics of command line use and shell scripting, The Linux Command Line includes chapters on many common programs used on the command line, as well as more advanced topics.

Profile Image for Kevin Webster.
3 reviews2 followers
February 21, 2017
I recommend this book to anyone that wants to take their linux command line curiosity to the next level. This book gives a very good introduction to the basics of the shell. One of my favorite sections of this book is the tour of the linux filesystem (chap 3).

The linux shell can be a scary place so do yourself a favor and read this book while you are exploring the command line.
Profile Image for Patrick Matte.
120 reviews8 followers
March 17, 2014
Bien que ce livre soit trop avancé pour mes besoins, la séquence de son contenu et son prix (gratuit) en font une très bonne référence pour devenir habile avec la ligne de commande Linux.
Profile Image for Matija.
93 reviews24 followers
July 22, 2017
Superbly written, occasionally subtly witty and chock-full of Linux knowledge sprinkled with engaging lore. Best book on Linux I ever laid my hands (and eyes) on.
28 reviews1 follower
September 1, 2020
As with most No Starch Press books, The Linux Command Line is a clear, concise, and fairly enjoyable read. It offers good introductory knowledge to both the command line and Linux in general. I think most readers would no longer be afraid of Linux.

While a solid book, I'd like to point out a few things that I think could be better.

The book's length feels awkward. At around 450 pages of densely technical writing, it's not the quickest read. It's too long as a quick primer, but too short to really get into the topic. I think it could have cut the more arcane sections and many of the command options.

The ordering is also a little strange. I think most people probably pick up the book to get a basic understanding of the commonly used aspects of Linux, the command line, and scripting. Instead, scripting is at the very end, after things like printing, networking, and archiving.

The target audience was a little unclear. The pacing is a little slow for someone with a programming background, yet occasionally too quick for those with little to no technical knowledge.

It would have been appreciated if the book provided some review. Given the density, I often had to look up commands previously introduced. And when explaining the code, comments next to it are much more efficient then have them separated which forces readers to flip back and forth to read it.
1 review
August 22, 2022
كتاب ممتاز جدا للمبتدئين في استعمال سطر الأوامر لينكس/يونكس حيث يعتمد الكاتب على أسلوب شيق ورائع جدا في الكتابة. يمكن القول أنه ينقل القارئ من مستوى مبتدئ إلى متوسط بسلاسة. بالمقابل لا أنصح به للمعتادين على استعمال سطر الأوامر ﻷنه لن يفيده كثيرا أنا شخصيا شعرت أن الأجزاء الثلاثة الأولى لم تفدني كثيرا، حيث أنه لم يتطرق حتى الى بعض الأوامر البسيطة فقد كان سطحيا جدا (مفيد للمبتدئين) الجزء الرابع الخاص بالسكريبتنغ كان ممتازا و استفدت منه حيث شعرت أنه تعمق قليلا في الموضوع حتى أنه أدرج أساليب البرمجة بعدة طرق مع الكثير من النصائح المفيدة للبرمجة بأمان وتجنب الأخطاء ... مثلا لم أكن أعرف أن بامكان الشل سكريبتنغ استعمال خاصية مزامنة الأوامر مثل اللغات العالية المستوى
(asynchronous scripting).


كرأي أعتقد أن أفضل جزء في الكتاب هو : الجزء الرابع الخاص بالشل سكريبتنغ
أضعف جزء في الكتاب هو الشابتر 16 في الجزء الثالث (الشبكات) حيث كان صغيرا ويمكن إضافة الكثير من المعلومات الأساسية التي اعتبرها مهمة جدا وناقصة من الكتاب.

أعتقد أن مايقوله الكاتب في اخر فقرة من الكتاب تلخص تعليقي نوعا ما :

".... Even though we covered a lot of ground in our trek, we barely scratched the surface as far as the command line goes . There are still thousands of command line programs left to be discovered and enjoyed. ..."
Profile Image for Ajita Gupta.
96 reviews
February 28, 2022
Assuming your test and production systems are based on Linux you won't get round to using it. This is an Amazon bestseller and a stellar effort by No Starch Press to introduce rookies to the daunting command line. The book content is very comprehensive. Although I couldn't follow all the nitty-gritty details I am grateful to have found a decent book on this topic. More specifically, the tools discussed are thusly: basic stuff like file system navigation, controlling processes, text editing/formatting, file search; advanced concepts such as compiling source code, printing, processing keyboard and command line inputs, troubleshooting. They form the basis of a toolset that is used to solve a host of practical day-to-day problems. This is particularly true for shell scripting, which brings us to the final part of the book, where these tools will really show their worth. In the simplest terms, a shell script is a file containing a series of commands. Due to their uncanny similarity, by learning shell scripting, you will also become familiar with concepts that can be applied to many other programming languages.
Profile Image for Kamal Krishna Joshi.
6 reviews35 followers
July 6, 2020
Although learning Linux is considered an onerous task, this book will certainly make things easier. I very much liked the approach this book takes to teach the command line. By taking only a few commands and their popular uses in each chapter, Mr. Shotts traverses his way towards the heart of Linux, i.e., the command line. This book only scratches the surface of the command line. Thus it is only useful for a complete beginner. Some things have been left untouched, viz., crontab, daemons, etc. Even the very basic command useradd was conspicuously missing, yet some other obscure commands have been introduced to no avail.
Profile Image for Mark Lacanilao.
14 reviews
December 9, 2022
Grad school is when I finally swallowed my pride and learned to navigate the dreaded UNIX environment. There comes a point in every developer's life when they realize Microsoft's boner for backwards compatibility with MS-DOS's lackluster command line has hindered modern computing in every way. WSL2 is just their way of admitting defeat after 30 long years of dirty antitrust tactics. Never again will I scoff at Vim and/or Emacs users and their caveman methods for development. Once you sell your soul to the open source community, you'll never want it back. Go forth, my anti-authoritarian brethren!
Profile Image for Pablo Hernandez.
11 reviews
March 24, 2024
I thoroughly enjoyed learning from "The Linux Command Line" book. It was a fun and informative read that significantly enhanced my understanding of Linux. The book delves into the power of the command line, the inner workings of the Linux operating system, and the fundamentals of Bash programming. The inclusion of an introductory section on Bash was a fantastic bonus.

By the book's end, I felt empowered and far more productive when working with the command line. Tasks like sorting and filtering CSV files are now a breeze thanks to the book's easy-to-follow instructions. As a software backend developer, I consider this book an invaluable addition to my professional toolkit.
Profile Image for Brian Wisti.
7 reviews4 followers
August 15, 2017
Much learning, especially after switching to the 3rd edition available online. Everything builds up on material covered in previous chapters, from basic Linux command line familiarity to GNU Coreutils to writing shell scripts in bash. Even though the book was good - just about perfect for its purpose -
by the end of it I was ready to jump back to my preferred programming languages. They have better support than bash for clearly describing complex solutions. But I see now how much of that support emulates or directly uses features from the shell. Learn something new every day!
26 reviews
April 21, 2019
Excellent book about the command line and bash shell scripting, sprinkled with general Linux operation.

As it is an intro book, it does not go into system administration details, but the overview that it offers was way above my expectations. If this is the first book that you read when starting to use a Linux based distribution, you will be more efficient in your work and things will fall in place better once you learn more about GNU/Linux.

The writing style is perfect for a technical book. The author is clearly knowledgeable and passionate.
Displaying 1 - 30 of 156 reviews

Can't find what you're looking for?

Get help and learn more about the design.