DEV Community

Cover image for TLDR – Makes it easier to understand man pages on Linux
LinuxH2O
LinuxH2O

Posted on • Originally published at linuxh2o.com

TLDR – Makes it easier to understand man pages on Linux

In this article, you will learn about an amazing tool called TLDR and how to install and use it on Linux distributions.

Linux has a built-in man utility tool. It is an interface to the reference manuals (Documentation). That means if you do not understand something like how a command or a function works then you can query for its man reference page to learn about it.

However, these pages can be long and confusing (especially for beginners) which eventually discourse you to read them.

Introducing TLDR, a tool that makes it easier to understand man pages in UNIX-Like systems such as Linux. It’s the same as man pages but very concise and has examples for different use cases.

To give a little context here, let me compare it with an example.

A man page for ‘ls’ command.

An example is very long. So listed here!

Example
(This link will take you to LinuxH2O.com)

And here is the same TLDR page for ‘ls’.

ls
List directory contents.

 - List files one per line:
   ls -1

 - List all files, including hidden files:
   ls -a

 - List all files, with trailing / added to directory names:
   ls -F

 - Long format list (permissions, ownership, size and modification date) of all files:
   ls -la

 - Long format list with size displayed using human readable units (KB, MB, GB):
   ls -lh

 - Long format list sorted by size (descending):
   ls -lS

 - Long format list of all files, sorted by modification date (oldest first):
   ls -ltr

Getting TLDR tool in your Linux distribution

TLDR can be installed in various ways. Here are a few of them that you can use to get it in your Linux distribution.

Installing using the ‘npm’

The ‘npm’ is the Node package manager. In order to use it, you have to have it in your system. It can be easily installed using the installation command.

For Debian/Ubuntu or any of their derivatives.

sudo apt install nodejs npm -y

For RedHat, Fedora or CentOS

sudo dnf install nodejs npm

Learn more about apt: Complete apt package manager guide for Linux
(This link will take you to LinuxH2O.com)

Similarly, you can use the installation command for your distribution if you are using any other one like Manjaro, OpenSUSE, etc.

Verify the installation using the version command.

npm -v

Result should be a number something like this.

v6.13.7

After having ‘npm’ installed, you can use its installation command to get the latest version of the ‘TLDF’ tool. For this use this command.

sudo npm install -g tldr

Now run the version command for ‘TLDR’ as well.

tldr --version

You should see a number in the output. If you are getting a ‘not found or not located error’ then you have to create a symbolic link. Use this command to do that.

sudo ln -s /usr/local/bin/tldr /usr/bin/tldr

Finally, you should be able to use the ‘TLDR’ in your Linux distribution.

Watch Video guide on YouTube

Additionally, You can also watch a step-by-step video guide on YouTube to get a better understanding of it.

Conclusion

So that is how you install and use ‘TLDR’ on Linux. Let me know what you think about it in the comments and subscribe to the LinuxH2O Youtube channel. Till then, keep enjoying Linux.

Top comments (0)