Master Linux Commands Quickly with tldr: Installation and Usage Guide
This guide introduces the tldr tool that simplifies Linux and macOS command usage by providing concise examples, explains how to install its various language clients, and demonstrates practical command snippets for ssh and curl, helping users avoid lengthy man pages.
What is tldr?
tldr (Too Long; Don’t Read) is an open‑source collection of concise, example‑driven pages for common command‑line tools, aimed at Linux and macOS users who need quick reference instead of full man pages. Project repository: https://github.com/tldr-pages/tldr
Installation
Clients are available for many languages and platforms. Install the desired client with the corresponding package manager:
C++ client (Homebrew) : brew install tldr-pages/tldr/tldr Crystal client (Homebrew) : brew install porras/tap/tlcr Go client : go get github.com/pranavraja/tldr (or download pre‑built binaries)
Node.js client : npm install -g tldr Perl5 client : cpanm App::tldr Python client : pip install tldr (or pip install tldr.py)
Ruby client : gem install tldrb Bash client : https://github.com/raylee/tldr
Web client : https://ostera.github.io/tldr.jsx
For a complete list of clients, see the main repository.
Basic usage
The command syntax is:
tldr [-h] [-o {linux,osx,sunos}] command [command ...] -h, --help: display help -o, --os: override the detected operating system (linux, osx, sunos)
Example: ssh
tldr sshTypical snippets returned by tldr ssh include:
Connect to a remote host: ssh username@remote_host Use a specific identity file: ssh -i /path/to/key_file username@remote_host Specify a non‑default port: ssh username@remote_host -p 2222 Run a remote command: ssh remote_host command -with -flags Dynamic port forwarding (SOCKS proxy): ssh -D 9999 -C username@remote_host Local port forwarding: ssh -L 9999:example.com:80 username@remote_host Enable agent forwarding:
ssh -A username@remote_hostExample: curl
tldr curlTypical snippets returned by tldr curl include:
Download a URL to a file: curl "URL" -o filename Send form‑encoded data: curl --data name=bob http://localhost/form Send JSON payload:
curl -X POST -H "Content-Type: application/json" -d '{"name":"bob"}' http://localhost/loginSpecify HTTP method: curl -X DELETE http://localhost/item/123 Make a HEAD request: curl --head http://localhost Add extra header: curl -H "X-MyHeader: 123" http://localhost Basic authentication:
curl -u user:pass http://localhostSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
ITPUB
Official ITPUB account sharing technical insights, community news, and exciting events.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
