tldr command in Linux, an acronym for “Too Long; Didn’t Read,” serves as a simplified and community-driven approach to understanding various command-line tools. Unlike the traditional man pages that provide exhaustive details,
tldr offers concise and practical examples to help users quickly grasp the essence of a command.
It’s often used in conjunction with commands like
info for a more comprehensive understanding. Whether you’re a seasoned professional looking to refresh your memory or a newcomer seeking to learn the ropes,
tldr can be a handy companion. Alongside this command, you might also find tools like cheat useful, offering similar functionality but with personalized cheat sheets.
How to Install the
tldr command is not included by default in most Linux distributions, so you will need to install it. The installation method can vary depending on the package manager your system uses. Here’s a general guide for installing and uninstalling
Debian-based systems (e.g., Ubuntu)
sudo apt update sudo apt install tldr
sudo apt remove tldr
Red Hat-based systems (e.g., Fedora)
sudo dnf install tldr
sudo dnf remove tldr
sudo pacman -S tldr
sudo pacman -R tldr
macOS (using Homebrew)
brew install tldr
brew uninstall tldr
Using Node.js (cross-platform)
npm install -g tldr
npm uninstall -g tldr
How to Use
1. Viewing a Summary of the ls Command
Explanation: Lists files and directories in the current directory.
ls List directory contents. - List files one per line: ls -1 - List all entries except for '.' and '..': ls -A - Long format list (permissions, ownership, size, and modification date) of all files: ls -la
The output provides a brief summary of the
ls command and shows some common usage examples, such as listing files one per line, excluding certain entries, and displaying detailed information.
2. Viewing a Summary of the grep Command
Explanation: Searches for a pattern within a file or text.
grep Print lines matching a pattern. - Search for an exact string: grep 'search_string' file.txt - Search for a pattern, ignoring case: grep -i 'search_string' file.txt - Search for a pattern in all files recursively in the current directory: grep -r 'search_string' .
The output provides a concise summary of the
grep command and includes examples of searching for an exact string, ignoring case, and performing a recursive search in the current directory.
3. Viewing a Summary of the tar Command
Explanation: Archives and compresses files and directories.
tar Archiving utility. - Create an archive from files: tar cf target.tar file1 file2 file3 - Extract an archive in a target folder: tar xf source.tar -C folder - Create a gzipped archive: tar czf target.tar.gz folder
The output provides an overview of the
tar command and includes examples of creating an archive from files, extracting an archive to a specific folder, and creating a gzipped archive.
More Linux commands:
|File System Operations||
|Search and Text Processing||
|System Information and Management||
|User and Session Management||