Chapter 1. The Macintosh Terminal

Welcome to the Macintosh’s best-kept secret: the Terminal! If you’ve ever browsed the Utilities folder, you’ve probably seen this icon:

image with no caption

Maybe you’ve even launched the Terminal and seen a plain, dull-looking window appear, displaying mysterious words:

image with no caption

But if you’re like most users, this is probably as far as you’ve explored. And that is a shame, because the Terminal is one of the most powerful programs for controlling your Mac.

What is the Terminal? What does it do? And why should you care? Let’s answer the last question by telling a few stories:

  • You’re running Microsoft Word for the Mac when its window suddenly freezes. You type, but nothing happens. You try to quit Word, but it doesn’t respond. In desperation, you go to the application dock, select the Word icon, and choose “Force Quit.” Even this has no effect! You are stuck and have no choice but to reboot your Mac.

  • You have a folder of 1,000 PDF files named file1, file2, file3, and so on. For compatibility with a coworker’s computer, you need to rename these files to have .pdf extensions. The Finder doesn’t seem to have any way to perform these renames in bulk, so you do them one file at a time (click, click, click) until your hands cramp.

  • Last week, you copied a huge folder of files (and all its subfolders, ...

Get Macintosh Terminal Pocket Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.