How to (not) remember shell commands

Because I'm a human, I'm pretty bad at remembering the options for shell commands. There's a relevant xkcd for this (though tar is one of the few where I do usually get it right without docs). Unix commands have man pages that will explain exactly what they do and what the options are. This is great for when you want to know everything a command can do, you're using it for the first time, or you want details. However, a man page is a very dense wall of information to parse when all you want to know is "what order do those arguments go in, again?" Enter tldr, a community effort to provide simple man pages with examples for many commands, with its own neat command-line interface.

For instance, if I were to run the command tldr docker, I'd see a description and example for a handful of the most common docker commands.

An image of the tldr output for the docker command.

Usage isn't restricted to top-level commands either. Docker (for instance) has an extensive CLI, and we can look at the usage of particular child commands in the way we might expect. For example, tldr docker run works just fine.

An image of the tldr output for the docker run command.

Installation instructions are on the tldr site. And yes, you can tldr tldr.


Published: 2020-12-30. Last updated: 2020-12-30.