Introduction
tldr is a really helpful tool for the command line.
It displays short, simple help pages for command line tools, from the user-maintained tldr-pages project.
The tldr entries are shorter and more digestible than man pages, so it is great for learning about other commands.
It does not come installed on most Linux distributions, but on many it is easy to install.
You can also use tldr via the web app without installing it.
There is even a PDF version available for offline use.
Installing tldr
There are various options for installation. On Ubuntu, the installation process is straightforward since it is available via the package manager. Other distributions will have different steps.
To install tldr on Ubuntu:
Command:
sudo apt install tldr
Once completed, you can confirm the installation by checking the version.
Command:
tldr --version
Example output:
0.6.4
If it installed correctly you will next need to update the offline cache of tldr pages with the command:
Command:
tldr --update
Using tldr
After it is installed and updated, you can use tldr to see command summaries and examples:
Command form:
tldr {{command name}}
Command example:
tldr tldr
Output:
tldr
Display simple help pages for command-line tools from the tldr-pages project.More information: https://tldr.sh.
- Print the tldr page for a specific command (hint: this is how you got here!):
tldr {{command}}
- Print the tldr page for a specific subcommand:
tldr {{command}}-{{subcommand}}
- Print the tldr page for a command for a specific [p]latform:
tldr -p {{android|linux|osx|sunos|windows}} {{command}}
- [u]pdate the local cache of tldr pages:
tldr -u
Conclusion
Often tldr is faster and easier to understand than man pages. It is a great tool to have in the workshop.