| Home Catalog FAQ | Log In |
Bundle Discount!
Save 30% when you build your own bundle of three or more books, including Take Control of...
(30% discount overrides other coupons and is calculated on the first screen of our cart.)
Take Control of the Mac Command Line with Terminal
Learn how to release your inner geek!
If you've ever thought you should learn how to use the Unix command line that underlies Mac OS X, or felt at sea when typing commands into Terminal, Joe Kissell is here to help! This 111-page ebook will help you become comfortable working on the Mac's command line, starting with the fundamentals and walking you through more advanced topics as your knowledge increases. And if you're uncertain how to put your new-found skills to use, Joe includes numerous real-life "recipes" for tasks that are best done from the command line.
The book begins by teaching you these core concepts:
Next, it's on to the command line, where you'll learn:
You'll extend your skills as you discover how to:
Questions answered include:
Finally, to help you put it all together, the book showcases 40 real-world "recipes" that combine commands you've learned to perform useful tasks, such as listing users who've logged in recently, figuring out why a disk won't eject, changing filename extensions, copying the source code of a Web page, downloading a file via FTP, determing which programs have open connections to the Internet, learning details about a domain name, and deleting stubborn items from the Trash.
Book Info
|
About the Author
|
Book Reviews
Author Interviews
|
Table of Contents
|
Read Me FirstWelcome to Take Control of the Mac Command Line with Terminal, version 1.0, published in March 2009 by TidBITS Publishing Inc. This book introduces you to Mac OS X’s command line environment, teaching you how to use the Terminal utility to accomplish useful, interesting tasks that are either difficult or impossible to perform in the graphical interface. The book was written by Joe Kissell and edited by Geoff Duncan. |
Back when I began using computers, in the early 1980s, user interfaces were pretty primitive. A computer usually came with only a keyboard for input—mice were a novelty that hadn’t caught on yet. To get your computer to do something, you typed a command, waited for some result, and then typed another command. There simply was no concept of pointing and clicking to make things happen.
When I finally switched from DOS to the Mac (without ever going through a Windows phase, I should mention!), I was thrilled that I could get my work done without having to memorize lists of commands, consult manuals constantly, or guess at how to accomplish something. Everything was right there on the screen, just a click away. It was simpler—not in the sense of being less powerful, but in the sense of requiring less effort to access the same amount of power. Like most everyone else, I fell instantly in love with graphical interfaces.
Fast forward a couple of decades, and I find myself faced with some mundane task, such as renaming all 500 files in a folder to use a different extension, deleting a file that refuses to disappear from the Trash, or changing an obscure system preference. After wasting some time puzzling over how to accomplish my task—and perhaps doing some Web searches—I finally discover that Mac OS X’s graphical interface does not, in fact, offer any built-in way to do what I want. So I have to hunt on the Internet for an application that seems to do what I want, download it, install it, and run it (and perhaps pay for it, too), all so that I can accomplish a task with my mouse that would have taken me 5 seconds in DOS 25 years ago.
That’s not simple.
I’m a Mac user because I don’t have time to waste. I don’t want my computer to put barriers between me and my work. I want easier ways to do things instead of harder ways. Ironically, Mac OS X’s beautiful Aqua graphical interface, with all its menus, icons, and buttons, doesn’t always provide the easiest way to do something, and in some cases it doesn’t even provide a hard way. The cost of elegance and simplicity is sometimes a lack of flexibility.
Luckily, Mac OS X isn’t restricted to the graphical realm of windows and icons. It has another whole interface that lets you accomplish many tasks that would otherwise be difficult, or even impossible. This other way of using Mac OS X looks strikingly like those DOS screens from the 1980s: it’s a command-line interface, in which input is done with the keyboard, and the output is sent to the screen in plain text.
The usual way of getting to this alternative interface (though there are others) is to use a program called Terminal, located in the Utilities folder inside your Applications folder. It’s a simple program that doesn’t appear to do much at first glance—it displays a window with a little bit of text in it. But Terminal is in fact the gateway to vast power.
If you read TidBITS, Take Control books, Macworld, or any of the numerous other publications about the Mac, you’ve undoubtedly seen tips and tricks from time to time that begin, “Open Terminal and type in the following…”. Many Mac users—especially those without prior experience in DOS or Unix—find that sort of thing intimidating. What do I click on? How do I find my way around? How do I stop something I’ve started? Without the visual cues of a graphical interface, lots of people get stuck staring at that blank window, frustrated that they can’t accomplish whatever task they’re trying to perform.
If you’re one of those people, this book is for you. It’s also for people who know a little bit about the command line—perhaps just enough to be dangerous—but don’t fully understand what they can do, how to get around, and how to stay out of trouble. By the time you’re finished reading this book and trying out the examples I give, you should be comfortable interacting with your Mac by way of the command line, ready to confidently use Terminal whenever the need arises.
It’s not scary. It’s not hard. It’s just different. And don’t worry—I’ll be with you every step of the way!
Much of this book is concerned with teaching you the skills and basic commands you must know in order to accomplish genuinely useful things later on. If you feel that it’s a bit boring or irrelevant to learn how to list files or change directories, remember: it’s all about the end result. You learn the fundamentals of baking not because measuring flour or preheating an oven is intrinsically interesting, but because you need to know how to do those things in order to end up with cookies. And let me tell you, the cookies make it all worthwhile!
Speaking of food—my all-purpose metaphor—this book doesn’t only provide information on individual ingredients and techniques. The last section is full of terrific, simple command-line recipes that put all this power to good use while giving you a taste of some advanced capabilities I don’t explore in detail. Among other things, you’ll learn:
Astute readers may note that some of these tasks can be accomplished with third-party utilities (most of which simply carry out command-line tasks in response to a mouse click). That’s true, but the command line is infinitely more flexible—and Terminal is free! It’s like the difference between buying supermarket cookies and being able to bake your own—in any variety, and in any quantity. Sure, there’s a place for prepackaged solutions, but it’s often quicker, easier, and more effective just to type a command into Terminal.
I should be clear, however, that this book won’t turn you into a command-line expert. I would need thousands of pages to list everything you can accomplish using the command line. Instead, my goal is to cover the basics and get you up to a moderate level of familiarity and competence. I may not answer every question you have, but you should get a solid foundation and be able to figure out how to learn more. I’ll take your feedback into account, too: if there’s sufficient interest, I may expand on this information in a future version of this book (or another Take Control title).
Most of the examples in this book work with any version of Mac OS X, but a few of them require Mac OS X 10.5 Leopard or newer. If you’re following along in Mac OS X 10.4 Tiger or earlier, you’ll notice that the Terminal application isn’t identical—it omits tabs and some other customization options—but mostly works the same.
This book is almost entirely linear—later sections build on earlier sections. I strongly recommend starting from the beginning and working through the book in order (perhaps skimming lightly over any sections that explain already-familiar concepts). You can use the items in the final section, Command-Line Recipes, at any time, but they’ll make more sense if you understand all the basics presented earlier in the book.
Most of the examples in this book work with any version of Mac OS X, but a few of them require Mac OS X 10.5 Leopard or newer. If you’re following along in Mac OS X 10.4 Tiger or earlier, you’ll notice that the Terminal application isn’t identical—it omits tabs and some other customization options—but mostly works the same.
Absolutely! This ebook was written with you in mind.
Most of this ebook will be too easy for you, sorry. It is possible that we'll publish a more advanced edition in the future.
There are lots of great ways to read PDFs on these devices. For more details, please read our latest Device Advice.
Feel free to ask us if you have a question about this book!
How could we not publish such kind words? If you'd like to send us your comments (good or bad, though we hope they're all good), just click the Feedback link on the cover of your copy of the ebook. Be sure to let us know if we can publish your comment. Thanks!
April 1, 2009 --
April 1, 2009 -- With nearly all the Take Control ebooks, including this one, once you've purchased and downloaded the PDF, you can print it yourself or you can buy a print-on-demand copy (at $10 off, since you already bought the ebook). In the case of this ebook, the print-on-demand version is delayed slightly because we need to check the fonts and margins. You can click the Order Print Copy button on the cover (page 1 of the PDF) at any time to check on the print-on-demand availability.
The print-on-demand version has the advantage of acting much like a normal book, with double-sided printing, book-like dimensions, and double-sided printing. However, you certainly can print the book on your own printer. In so doing, we recommend that you test-print a few of the pages in the Command-Line Recipes section, since some of those recipes extend into the right margin (we did this so that you can copy and paste them into Terminal without accidentally introducing line breaks). If your printer cuts off these wide lines, you can make everything fit by printing with a small reduction—try setting the Scale to 90 percent, for instance, or if it appears in your Print dialog, try the "Scale each page to fit paper" radio button.
—Tonya Engst
March 26, 2009 --
For years now, Take Control readers have been requesting a basic ebook on how to use the Mac's command line, and we've finally done it. Take Control of the Mac Command Line with Terminal, written by the award-winning Joe Kissell and edited by Geoff Duncan, distills both Joe's own expertise and many suggestions from savvy geeks into 111 pages about getting more out of your Mac from the command line. Written entirely from a Mac user's point of view, the ebook starts with the fundamentals and walks you through more advanced topics as your knowledge increases. And to help you put new-found skills to use, you'll also find 40 real-life "recipes" for tasks that are best done from the command line.
Put simply, if you've ever thought you should learn how to use the Mac's command line, or worried about doing something wrong while following command-line-related instructions from the Web, this $10 ebook will give you the skills and confidence you need to make your Mac even more capable than ever before.
—Adam C. Engst
Visit our catalog to see all the other books we publish!
Teach classes? Check out our discounted class copy pricing!
Orders are processed for us by eSellerate (ebooks) and QOOP (print books) on secure sites.
Copyright 2008 TidBITS Publishing Inc. | Privacy Policy | Contact
