Why is tldr command better than man command in Linux?
To avoid confusion, it should be said first that this article will be covering the man and tldr commands in Linux. Although man pages are extremely detailed, they can be confusing, especially for beginners. Instead, you can use the tldr command to get a short, simple, and easy-to-understand explanation of any Linux command.
In this article, we will dive into what tldr is, how to use it, and why it is a better alternative to the traditional man command.
Man Order
The man command, also known as manual, is the traditional way to access manual documentation for commands in Unix-like operating systems. When you type man along with a command, it pulls up the manual page for that particular command, providing detailed information about the command's usage, options, and examples.
For example, you can get a detailed overview of the ls command by executing this command:
man ls
This command will open a wizard page that lists all the available options. The information is organized into sections such as NAME , SYNOPSIS , DESCRIPTION , OPTIONS , and EXAMPLES . While this structure makes it easy to navigate, it can also be quite extensive.
The man command can be extremely useful for advanced users who need in-depth knowledge, but for beginners or even intermediate users, it requires wading through a large amount of text. The sheer amount of information can be overwhelming and you can easily get lost in it.
What is Tldr?
tldr stands for too long; didn't read, a phrase that originated on the Internet to describe a summary of a long piece of text. Unlike man pages, tldr pages focus on the most useful options and provide many clear, practical examples.
For example, when you run tldr ls in the terminal, the tldr command will give you a brief summary of the ls command, along with some of its most commonly used options:
tldr ls
As you can see, tldr pages are much more concise and straight to the point, making it easier for new users to understand and start using the command.
How to use Tldr
To access tldr pages conveniently, install a supported client. One of the main clients is Node.js, which serves as the native client for the tldr project. To explore other clients available for different platforms, you can refer to the TLDR client wiki page.
You can install Node.js using the package manager that corresponds to your Linux distribution. For example, on Debian-based distributions like Linux Mint or Ubuntu, run this command:
sudo apt install nodejs npm
Once you have installed Node.js and its npm package manager, you can install the tldr client by running this command:
sudo npm install -g tldr
If you want, you can also install tldr as a Snap package by executing the command:
sudo snap install tldr
Once installed, the tldr client allows you to view simplified, easy-to-understand versions of command line man pages. For example, to get a quick summary of the tar command, just type:
tldr tar
You can also search for specific commands by keyword with the --search option :
tldr --search "Keyword"
Alternatively, you can list all available commands using the -l option :
tldr -l
You can also just run tldr in terminal to explore all the other tldr command options:
If you prefer a browser-based experience, the official tldr website offers the same content in a web-friendly format. It includes features like a search bar with autocomplete functionality and labels indicating whether the command is specific to Linux or macOS.
Additionally, each help page also links to its source on GitHub, where you can suggest edits or improvements using GitHub's built-in tools — no need to learn Git.
Why is tldr better than man?
tldr pages are designed to be easy to read and understand. They strip away the clutter, providing only the most essential information to get started with a command.
Unlike man pages, which often cover every possible option and detail, tldr pages focus on practical examples. These examples show how you can use commands in real-world situations, making it easy to apply what you've learned.
tldr works on multiple platforms, including Windows, macOS, and Linux, making it a versatile tool that you can use anywhere.
Whether you're a newbie looking to get started quickly or an advanced user needing a quick refresher, tldr is a great addition to your toolkit.
However, keep in mind that the tldr command is not a complete replacement for man pages. For more technical in-depth knowledge, always keep the traditional manual pages as a comprehensive reference.
You should read it
- How to use the which command in Linux
- 20+ essential Linux security commands
- Del command in Windows
- How to use the stat command on Linux
- The Cat command in Linux
- The dd command in Linux, How to use the dd command
- How to use the history command in Linux
- Tail command in Linux
- Instructions for using find command in Linux
- How to use the command history function in Command Prompt
- 11 uses of ps command in Linux
- Set command in Windows