The Linux Command Line
A Complete Introduction
Publisher: No Starch Press
Final Release Date: January 2012
Pages: 480

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.

Table of Contents
Product Details
About the Author
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyThe Linux Command Line
 
4.3

(based on 6 reviews)

Ratings Distribution

  • 5 Stars

     

    (2)

  • 4 Stars

     

    (4)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (0)

100%

of respondents would recommend this to a friend.

Pros

  • Easy to understand (6)
  • Well-written (5)
  • Accurate (4)
  • Concise (3)
  • Helpful examples (3)

Cons

    Best Uses

    • Novice (6)
    • Student (6)
    • Intermediate (4)
      • Reviewer Profile:
      • Developer (4), Designer (3), Educator (3)

    Reviewed by 6 customers

    Sort by

    Displaying reviews 1-6

    Back to top

    (1 of 1 customers found this review helpful)

     
    4.0

    Great intro to the command line

    By gnudoc

    from Scotland

    About Me Sys Admin

    Verified Reviewer

    Pros

    • Concise
    • Easy to understand
    • Well-written

    Cons

    • Too Few Real-life Samples

    Best Uses

    • Novice
    • Student

    Comments about oreilly The Linux Command Line:

    I picked this book up with a great deal of skepticism, thinking it would be yet another volume that claimed to delivery mastery of the command line but be far too dry to keep the reader's attention beyond page 20. This did neither of those.

    The author manages to deliver an accurate and useable summary of the unix shell, giving gentle introductions to more complex topics (and perhaps the best shell scripting 101 I've ever seen) in the later chapters, with an emphasis on linux but trying to be reasonably platform-agnostic. I was surprised to find Make no mistake - this is a text primarily aimed at the novice, but I suspect most self-taught sysadmins will spot a technique or two that they didn't know of.

    My only complaint is that, as a book geared towards novices, I would like to have seen more real world code samples and projects to really bring this text to life.

    (4 of 5 customers found this review helpful)

     
    4.0

    A useful book for beginners to Linux

    By vasudevram

    from Pune, India

    About Me Developer, Educator, Sys Admin

    Verified Reviewer

    Pros

    • Accurate
    • Easy to understand
    • Well-written

    Cons

      Best Uses

      • Novice
      • Student

      Comments about oreilly The Linux Command Line:

      Book title: The Linux Command Line

      Author: William E. Shotts, Jr.

      Publisher: No Starch Press

      The author is a software professional with over 15 years experience and
      has worked extensively with Linux. He has a site devoted to Linux
      education, advocacy and command-line support, at:

      http://linuxcommand.org/

      That site also has some additional good Linux resources.

      The book is a good survey of the subject, with enough detail for beginners.
      It covers many topics that a new Linux user should know.

      I am not going to talk about the table of contents, because that is available at the page for the book, linked at the end of this post.

      Below, I make some comments about the book's content itself.

      Try to learn what I call meta-commands (for lack of a better word). There is no such term, as far as I know; I made it up. What I mean by meta-commands is, commands that help you learn about other commands, such as apropos, which, man, file, info and whatis.

      Understanding input-output (I/O) redirection, pipes and filters is one of the keys to using the power of Linux effectively (because these concepts enable you to chain multiple commands together, to achieve much more powerful results than is possible with a single command).

      So is learning to use the Linux metacharacters, such as many that start with the $ sign ($*, $#, $!, $-, ...), as well as *, [], ?, , >>, the different kinds and uses of quotes (', "", `), etc. This may sound complex or vague at this point, but once you read the book, and come across the examples of the metacharacters, it will be easier to understand what they are used for and how and when to use them, and how they can make your work easier.

      Commonly used and powerful filters include sed, awk, grep, head, tail, cut, paste, diff, comm, tr, col, tee, sort, uniq, cat, nl, pr, etc.

      Learn one or two backup and restore commands such as tar and cpio. Backup of your data, programs and scripts is very important due to things like hard disk or computer failure.

      Learn to use one of the commonly used text editors such as vi(m) or emacs reasonably well.

      Almost everything in Linux is a file, or at least, can be treated as a file (for many purposes).

      File permissions are one of the core concepts in Linux. Learn them - not just read / write / execute permissions for files, but also the meaning of read and execute permissions for directories, and about the sticky bit and the setuid bit, and hard and symbolic links.

      Learn the basics of how to know what processes are running on your system, how to identify what process corresponds to what program you ran, how to terminate a process, etc.

      Shell environment variables are also a core concept. Learn how to use and set and change them.

      Learn how to install and uninstall software packages for your Linux distribution and how to check whether a package is installed. Though the concepts are similar across distributions, the details differ.

      Find out about Linux devices. Each hardware peripheral attached to your Linux computer, such as hard disks, CD-ROMs, USB drives, tape drives, etc., is represented by a device and a corresponding device file. You will have to know the names of some device files in order to be able to do operations involving them.

      Develop an understanding of file systems, the different types of files systems, partitions, and what it means to, and how to, mount and unmount them.

      Basic Linux networking usage is useful - how to transfer files by FTP, how to login to another system via telnet and ssh, how to mount remote file systems so they appear as local ones, etc.

      Since there are thousands of files in a typical Linux system, learning how to harness the power of commands that help you find files by various criteria, is useful. Some such commands are find, locate and grep. In Linux, commands are often used in combination, in a pipeline, to get greater functionality than by one command alone.
      For example, the output of find can be piped to grep to find required files faster.

      This is a somewhat long review (though nearing the end). But I wanted to give some details instead of just hand-waving generalities. A shorter way of putting it would be: learn to harness the power and productivity offered by the Linux operating system. That is one of its distinguishing characteristics.

      Apart from the content itself, some other points that I liked about the book, were the writing style:

      - short and clear sentences, and a conversational tone

      - it feels like a friend is guiding you through the topics.

      Overall, I think it is a good book for the purpose.

      A very good book to read after reading the one under review, is this one: The Unix Programming Environment, by Kernighan and Pike. This is one of the classics of the field. It was written long ago, but is by some of the people who developed Unix (the predecessor of Linux) at Bell Labs, and most or all of it is still relevant and
      up-to-date today, except for the fact that Linux has many new commands (and a few new concepts), which are not covered in it. But the core and most useful commands and programming techniques and guidelines are covered, and very well, in this book.

      After reading the above books, those who are programmers coming from other operating systems, and want to explore writing their own Linux command-line tools (in C, which is one of the native languages of UNIX/Linux), may want to read this tutorial article by me on that very topic, written for IBM developerWorks:

      Developing a Linux command-line utility
      http://www.ibm.com/developerworks/linux/library/l-clutil/

      Here is the O'Reilly catalog page for the Linux Command Line book:

      http://shop.oreilly.com/product/9781593273897.do

      Enjoy Linux.

       
      4.0

      Great for Beginners

      By Danny Mac

      from Aurora, CO

      About Me Developer

      Verified Reviewer

      Pros

      • Accurate
      • Easy to understand
      • Well-written

      Cons

      • Could go deeper

      Best Uses

      • Intermediate
      • Novice
      • Student

      Comments about oreilly The Linux Command Line:

      If you really want to know your way around a Linux box, this is the book to get. It gently exposes you to the environment in very digestible nuggets. Starting with "What is a Shell" and typing your first simple commands all the way to writing shell scriptsutilizing IF statements, CASE statements and Loops, this book will take you as far as you want to go. It's written in a conversational style that makes it quick to read & understand. There's also some fun geek-realted quotes you won't want to miss...

      "Have you ever noticed in the movies when the "super hacker"—you know, the guy who can break into the ultra-secure military computer in under 30 seconds—sits down at the computer, he never touches a mouse? It's because movie makers realize that we, as human beings, instinctively know the only way to really get anything done on a computer is by typing on a keyboard."

      For the beginner, you want to take your time with Part 1: Learning the Shell. It lays a solid foundation for you to work from in later chapters. Understanding the basics, especially the location of files within the file system itself, will allow you to move through the latter section more easily. And pay attention to the tips that are presented to you. I still consider myself a N00b, but I thought I knew precisely what symbolic links were... but I was wrong. This book taught me a few new things along the way.

      For the intermediate or advanced user, you may find all you need online and need not bother with buying a book. I like consolidated information though (I have enough tabs open in Firefox and Chrome already) and if you're intermediate and looking to write shell scripts and possibly automate some system maintenance, I think you'll find this book useful. It'll give you insights and examples that you can build off of.

      Another quote from the author that I like explains it like this:

      "Most computer users today are familiar with only the graphical user interface (GUI) and have been taught by vendors and pundits that the command line interface (CLI) is a terrifying thing of the past. This is unfortunate, because a good command line interface is a marvelously expressive way of communicating with a computer in much the same way the written word is for human beings. It's been said that "graphical user interfaces make easy tasks easy, while command line interfaces make difficult tasks possible," and this is still very true today."

      This is true of Windows as much as it is of Linux... so get your hands on the keyboard and enjoy!

      (11 of 11 customers found this review helpful)

       
      5.0

      A must buy for new Linux users

      By Sanyam

      from Jabalpur, Madhya Pradesh

      About Me Designer, Educator

      Verified Reviewer

      Pros

      • Accurate
      • Easy to understand
      • Helpful examples
      • Well-written

      Cons

        Best Uses

        • Intermediate
        • Novice
        • Student

        Comments about oreilly The Linux Command Line:

        I am new to Linux systems,that does not mean I did not try my hands before but that I found learning the commands so boring and tough that I use to give up after typing/using 2-4 commands. But This book has really got a nice way of making you learn Linux commands. Chapter by chapter you find it more and more interesting. I am done with the first two parts of the book and believe me I feel like "Give me any Linux systems I just need its shell and this book, I can work comfortably".

        Such is the quality of presentation that author gives a quick view of 5-10 commands to be covered in a chapter at the start and by the end of the chapter you realize that you have not just learned those 5-10 commands but in fact awesome lot of things. I cannot resist myself reading this book each day. Really love this book.
        Although the book does not cover all the commands but at times author tells in which folder of your system you can find more commands.
        Not being voluminous(those irritating 600 + pages ) has kept the book in good shape so that a new a user can get a quick, though lot of exposure to a Linux system.
        I would like to thank Williams (author) for writhing such a great book and the publishers (No scratch press) for publishing such a nice material.

        (2 of 2 customers found this review helpful)

         
        5.0

        Simply Superb - Linux Learning Made Fun

        By shawnday

        from Dublin, Ireland

        About Me Designer, Developer, Educator

        Verified Reviewer

        Pros

        • Accurate
        • Concise
        • Easy to understand
        • Helpful examples
        • Well-written

        Cons

          Best Uses

          • Intermediate
          • Novice
          • Student

          Comments about oreilly The Linux Command Line:

          The Linux Command Line: A Complete Introduction by William Shotts jr is as complete as you might desire / imagine and delivers much more than it promises. This is simply the most fun, yet strikingly comprehensive, introduction to Linux that you could want. As the title states it focusses on interaction via the Linux command line yet delves into popular GUI's at times and provides such comprehensive coverage that you will go from newbie to pro in no time. The author states plainly his intention that you progress linearly through the book and in that it is provides what I felt was a perfect pace. The chapters are bite size and deal with specific aspect of command line interaction. Appropriate commands and instructions are introduced and then put into practical use. It's instructive both theoretically and with hands-on exercises.

          The prose is so well crafted and so friendly and chatty, without being annoying, that you are simply carried along. I have to say, and it's the last thing I would have expected to say about a Linux book, let alone a command line focused one, but this is a fun read! Seriously. I have used a wide variety of Linux and Unix manuals in my time, sometimes for reference and often for instruction, but this book is head and shoulders above them all. I can't believe that it really delivers a compelling case as to why the command line can be your friend and also in the process makes you realise that how raw Linux power underlies the modern GUI.

          This is a very comprehensive manual and takes you through to a relatively advanced level starting from scratch. It presumes no prior knowledge, and starts off with suggestions on how to deploy a flavor of Linux so you can play with it. As I mention, the chapters are perfectly manageable from the perspective of being able to mentally address a specific concept and despite the comprehensive nature, the volume moves you through at a solid and suitable pace.

          I can't recommend this book enough for novice and intermediate user alike. It offers excellent self-paced instruction and enforces the learning with well crafted exercises. It is clearly well crafted and thoughtfully devised and a superb investment.

          (2 of 2 customers found this review helpful)

           
          4.0

          The linux command line - by William E. S

          By DC Crowley

          from Netherlands

          About Me Designer, Developer

          Pros

          • Concise
          • Easy to understand
          • Helpful examples

          Cons

            Best Uses

            • Intermediate
            • Novice
            • Student

            Comments about oreilly The Linux Command Line:

            A book that covers how to use the linux command line for moving, copying, file permissions,text editing with VI, creating shell scripts (and troubleshooting them), network issues, storage media, compiling, get-apt... and more

            Probably not a unique book but "no starch" is a great book series imo. This is very good, general book for beginners and intermediates. No book covers everything, but this will cover most situations and teach you how to deal with it. If you use Apple computers this could be for you as well as BSD is a very close cousin to linux. One book will never do for your Linux life but this one should educate you and keep you out of trouble. If I were to recommend one other book it would be O'Reilly's Unix power tools.

            O'Reilly publishing approached me with a view of reviewing books for them. Having a lot of respect for them I agreed. That does not mean automatic good reviews. In this case I have no hesitation in recommending this book.

            Displaying reviews 1-6

            Back to top

             
            Buy 2 Get 1 Free Free Shipping Guarantee
            Buying Options
            Immediate Access - Go Digital what's this?
            Ebook: $39.95
            Formats:  ePub, Mobi, PDF
            Print & Ebook: $43.95
            Print: $39.95