https://www.maketecheasier.com/linux-tldr-command
To avoid any confusion, I must first state that this article is dealing with the man
and tldr
commands in Linux. While man pages
are incredibly detailed, they can be intimidating, especially for those
just starting out. Instead, you can use the tldr command to get a
short, simple, and easy-to-understand explanation of any Linux command.
In this guide, we’ll dive deep into what tldr
is, how to use it, and why it’s a better alternative to the traditional man
command.
The Man Command
The man
command, referred to manual, is the traditional
way to access documentation for commands in Unix-like operating systems.
When you type man
along with a command, it pulls up the
manual page for that specific command, providing detailed information
about its usage, options, and examples.
For example, you can get a detailed overview of the ls
command by executing this:
man ls
This opens a manual page listing all the available options. The information is organized into sections like 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 incredibly useful for advanced
users who need in-depth knowledge, but it may feel like wading through a
vast amount of text for beginners or even intermediate users. The sheer
volume of information can overwhelm you, and you can easily lose your
way in it.
What Is Tldr?
tldr
stands for too long; didn’t read,
a phrase originating on the internet to describe a summary of a long
text piece. Unlike man pages, tldr pages focus on the most useful
options and provide clear, real-world examples.
For example, when you run tldr
ls in the terminal, the tldr command will provide you with a brief overview 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 to the point, making it easier for new users to quickly understand and start using a 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 original client for the tldr project. To explore other client applications available for different platforms, you can refer to the TLDR clients wiki page.
You can install Node.js using the package manager corresponding to your Linux distribution. For example, on Debian-based distributions such as Linux Mint or Ubuntu, run this:
sudo apt install nodejs npm
Once you’ve installed Node.js and its package manager npm, you can globally install the tldr client by running this:
sudo npm install -g tldr
If you prefer, you can also install tldr as a Snap package by executing:
sudo snap install tldr
After installation, the tldr client allows you to view simplified,
easy-to-understand versions of command-line manual pages. For instance,
to get a concise summary of the tar
command, simply type:
tldr tar
You can also search for specific commands using keywords with the --search
option:
tldr --search "Keyword"
Additionally, you can list all available commands using the -l
option:
tldr -l
You can also simply run tldr
in the terminal to explore all 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 and labels indicating whether a command is specific to Linux or macOS.
No comments:
Post a Comment