TLDR: Linux Man Pages Simplified

Let me ask you a question. Have you ever used the man command? If you haven’t, try now. Open your terminal window and run this:

man man

What do you see? Are feeling overwhelmed yet? Okay, long story in short —  the man command is an interface for reference manuals of various commands. If you want to know what does a specific command do, it is your friend. It will show you every tiny detail of that command. But while that huge amount of information is useful in learning a command in-depth, it can also be quite painful if you just want to glimpse through some basic usages pronto.

That is the problem tldr aims to solve. Let’s take a look!

[irp posts=”12113″ name=”Googler: Now You Can Google From Linux Terminal!”]

TLDR

In general, TLDR is an internet slang for “Too Long Didn’t Read” and you might now understand the logic behind the name of this project.

TLDR is a community-driven project that simplifies the man pages. And every entry comes with useful practical examples. Let’s look at an example and compare it to man output.

The man page for the ls command is the following:

man ls - Output
man ls – Output

And it goes on for about 234 lines! Now, let’s see the tldr page for ls :

tldr ls - Output
tldr ls – Output

And that’s just it, covering the basic usages in less than 25 lines!

If you are new to the terminal, TLDR is a great tool that will help you learn the basic usages of various commands. Whenever you wonder what a particular command can do or might do, just type:

tldr <command>

and hit Enter. It’s just as simple as that. Also, if you just feel like learning a new command, you can try:

tldr --random

It will show tldr-page for a random command.

TLDR is not only limited to the terminal. There is a live Web Client available if you want to use it without installing anything on your system. Just open it in your favorite browser.

TLDR Web Client

And you can search for various commands’ man pages from there.

[irp posts=”15812″ name=”nnn: A Blazing Fast Terminal File Browser For Pro Linux Users”]

Installing TLDR on Ubuntu using Node.js

Being a beloved project by the community, TLDR has many clients. You can find a list of them in the GitHub project page. However, the official client is a Node.js application. For running it, you must have Node.js installed on your system. Installing Node.js on Ubuntu is a rather easy task. Let’s do it first:

sudo apt install nodejs npm

That’s it. Now for installing TLDR, use the following command:

sudo npm install -g tldr

Now, TLDR is ready for use. However, the first thing you might want to do is updating the TLDR cache:

tldr --update

TLDR is an active project. New manuals are being added frequently. So if you couldn’t find the entry for any command, you can try updating the cache.

Installing TLDR on Ubuntu using Bash

As I said, there are several clients for this tool. If you don’t want to use the Node.js version, you can go for the unofficial Bash client.

To install it, just use the commands below:

loc=/usr/local/bin/tldr  
sudo wget -qO $loc https://4e4.win/tldr
sudo chmod +x $loc

And then you can start it with the command tldr.

Troubleshooting tip:

If you are getting “/usr/bin/env: node: No such file or directory” error while running npm command to install some node module, you can easily fix it.

What happens here is that the program looks for binary with path /usr/bin/env whereas the correct path in the system might be /usr/bin/nodejs. Making a soft link should fix it:

ln -s /usr/bin/nodejs /usr/bin/node


What do you think about TLDR? Are you going to try it? Let us know!

Similar Posts