11 C
Tuesday, January 19, 2021

Display Linux Commands Cheatsheets With Tealdeer Tool

Must read

The growing number of resources have made learning the Linux commands convenient and easier for newbies. One of the notable resource is tldr-pages. The tldr-pages project is a collection of simplified and community-maintained help pages for command line tools. Unlike the traditional man pages, the tldr-pages project provides concise and practical examples for a given command line tool, excluding all other comprehensive text parts. Apart from the official tldr client, there are many third-party clients exists to access the tldr-pages. One of them is Tealdeer. Tealdeer is a fast, un-official tldr client that allows you to access and display Linux commands cheatsheets in your Terminal.

The developer of Tealdeer claims it is very fast compared to the official tldr client and other community-supported tldr clients. Tealdeer is an opensource tool written in Rust programming language and its source code is freely available in GitHub.

Install Tealdeer tldr client in Linux

Tealdeer can be installed in multiple ways as listed below.

1. Install Tealdeer using package manager

Tealdeer has been packaged for many Linux distributions.

For Arch Linux and its derivatives, it is available in AUR –  tealdeertealdeer-bin or tealdeer-git. You can install any one of these tealdeer packages using an AUR helper program, for example Yay, like below:

$ yay -S tealdeer


$ yay -S tealdeer-bin


$ yay -S tealdeer-git

To install Tealdeer on Fedora, run:

$ sudo dnf install tealdeer

On NixOS:

$ nix-env --install tealdeer

On openSUSE:

$ sudo zypper install tealdeer

On Void Linux:

$ sudo xbps-install --synchronize tealdeer

2. Install Tealdeer using cargo

Install Rust programming language on your Linux system if you haven’t installed it yet.

Then, run the following command to install Tealdeer using cargo package manager:

$ cargo install tealdeer

3. Install Tealdeer from static binaries

You can also download the pre-compiled binaries from the GitHub releases page and move it to your $PATH like below.

$ wget https://github.com/dbrgn/tealdeer/releases/download/v1.4.1/tldr-linux-x86_64-musl
$ sudo cp tldr-linux-x86_64-musl /usr/local/bin/tldr

Make it executable:

$ sudo chmod +x /usr/local/bin/tldr

Optionally, you can download the shell completion script for your $SHELL from the releases pages to enable auto completion feature.

  • Bash: copy bash_tealdeer file to /usr/share/bash-completion/completions/tldr
  • Fish: copy fish_tealdeer file to ~/.config/fish/completions/tldr.fish
  • Zsh: copy zsh_tealdeer file to /usr/share/zsh/site-functions/_tldr

Display Linux Commands Cheatsheets With Tealdeer In Terminal

Getting cheatsheets for Unix & Linux commands is made much easier with Tealdeer!

Before start using Tealdeer, you must update its cache with command:

$ tldr --update

Now you can display any Unix and Linux command’s cheatsheet with Tealdeer client like below:

tldr command_name

For example, I am going to display ls command’s cheatsheet using Tealdeer using this command:

$ tldr ls

The Tealdeer client will fetch the requested cheatsheet from the tldr-pages project and display it in your Terminal.

Here is the sample output of above command:

  List directory contents.

  List files one per line:

      ls -1

  List all files, including hidden files:

      ls -a

  List all files, with trailing `/` added to directory names:

      ls -F

  Long format list (permissions, ownership, size and modification date) of all files:

      ls -la

  Long format list with size displayed using human readable units (KB, MB, GB):

      ls -lh

  Long format list sorted by size (descending):

      ls -lS

  Long format list of all files, sorted by modification date (oldest first):

      ls -ltr
Display Linux Commands Cheatsheets With Tealdeer In Terminal

See? There is no comprehensive text parts, no explanation for each flags/options. Just a small description about ls command and the practical example commands! You can pick the one that you want to use from the list!

No need to browse through the man pages or no need to do web search. Tealdeer can get you practical examples for the most Unix and Linux commands.

You can even get the tldr command’s examples like below:

$ tldr tldr

  Displays simple help pages for command-line tools, from the tldr-pages project.
  More information: <https://tldr.sh>.

  Get typical usages of a command (hint: this is how you got here!):

      tldr command

  Show the tar tldr page for Linux:

      tldr -p linux tar

  Get help for a git subcommand:

      tldr git-checkout

  Update local pages (if the client supports caching):

      tldr -u

To list all commands in the cache, run:

$ tldr --list

If you want to clear the local cache, use -c, --clear-cache flag.

$ tldr --clear-cache

After clearing the cache, don’t forget to update the local cache:

$ tldr --update

For more details, refer tldr help section:

$ tldr --help

    tldr [options] <command>...
    tldr [options]


    -h --help           Show this screen
    -v --version        Show version information
    -l --list           List all commands in the cache
    -f --render <file>  Render a specific markdown file
    -o --os <type>      Override the operating system [linux, osx, sunos, windows]
    -u --update         Update the local cache
    -c --clear-cache    Clear the local cache
    -p --pager          Use a pager to page output
    -m --markdown       Display the raw markdown instead of rendering it
    -q --quiet          Suppress informational messages
    --config-path       Show config file path
    --seed-config       Create a basic config
    --color <when>      Control when to use color [always, auto, never] [default: auto]


    $ tldr tar
    $ tldr --list

To control the cache:

    $ tldr --update
    $ tldr --clear-cache

To render a local file (for testing):

    $ tldr --render /path/to/file.md


Related read:

Source link

- Advertisement -

More articles


Please enter your comment!
Please enter your name here

Latest article