Site icon ChrisWrites.com

Confused by the command line? Get more user-friendly Terminal explanations, with tldr

The Terminal is one of macOS’ most powerful and versatile utilities, but with over 1,400 commands to choose from, even if you use the Terminal on a day-to-day basis, it’s unlikely that you’ll be able to memorise all the Terminal commands.

Regardless of whether you’ve encountered a command for the first time, or just need a refresher about a Terminal command you haven’t used in a while, one option is to turn to macOS’ built-in manual for help. Simply type ‘man’ (short for manual) into the Terminal, followed by the command you’re unsure about, and the Terminal will display all the information it has about this command.

The catch is that macOS’ manual isn’t particularly user-friendly (especially if you’re confused about a command to begin with!) and tends to display every single piece of information that it has about a particular command, which can be overwhelming. For example, here’s the manual entry for the ‘cd’ (“change directory”) Terminal command:

If you’ve ever read a command’s manual entry and are still unsure about what this command actually does, then you’re not alone, as macOS’ less-than-clear explanations have resulted in the creation of tldr (Too Long; Didn’t Read); an entire project dedicated to providing a more human-readable version of macOS’ manual.

Let’s compare macOS’ ‘cd’ definition, with the tldr version:

This is much easier to understand, and although it isn’t as thorough as the manual explanation, once you’ve grasped the fundamentals you can always turn to the macOS manual for more detailed information.

In this article, I’ll show you how to access a more concise, human-readable definition of every Terminal command, by installing tldr on your Mac.

Installing and using tldr

The easiest way to install tldr is to use the Homebrew package manager, so if you don’t already have Homebrew installed, then you’ll need to install it:

xcode-select –install

ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

As soon as Homebrew is installed, you can download, build and install tldr, simply by running the following command in the Terminal:

brew install tldr

Once tldr is installed, you can view a more concise, user-friendly explanation for any Terminal command, by typing “tldr” into the Terminal window, followed by the command you’re unsure about. For example, if you wanted more information about the “sudo” command, then you’d need to enter the following: tldr sudo

Don’t want to install tldr?

If you like the sound of tldr but don’t particularly want to install another piece of software, then it’s possible to access tldr as a web application. Simply head over to tldr’s dedicated website and search for the command that you want to learn more about, and the web application will display tldr’s definition for that command – with no installation required.

Exit mobile version