Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the Tldr command in linux

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to use the Tldr command in linux, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Install Tldr++

Installing Tldr++ is very simple. Download the latest version of Tldr++ from the release page. Extract it and move the Tldr++ binaries to your $PATH.

$wget https://github.com/isacikgoz/tldr/releases/download/v0.5.0/tldr_0.5.0_linux_amd64.tar.gz $tar xzf tldr_0.5.0_linux_amd64.tar.gz $sudo mv tldr / usr/local/bin $sudo chmod + x / usr/local/bin/tldr

Now, run the tldr binary to deploy the TLDR manual to your local system.

$tldr

Sample output:

Enumerating objects: 6, done. Counting objects: 100% (6 stroke 6), done. Compressing objects: 100% (6 stroke 6), done. Total 18157 (delta 0), reused 3 (delta 0), pack-reused 18151 Successfully cloned into: / home/sk/.local/share/tldr

Tldr++ can be used in AUR. If you use Arch Linux, you can use any AUR helper to install it, such as YaY. Make sure you have removed any existing TLDR clients from the system and run the following command to install Tldr++.

$yay-S tldr++

Alternatively, you can compile from the source code as described below. Because Tldr++ is written in Go, make sure you have Go installed on your Linux system. If it is not already installed, please refer to the guide below.

How to install Go language in Linux system

After installing the Go language, run the following command to install Tldr++.

$go get-u github.com/isacikgoz/tldr

This command downloads the contents of the tldr code base in the current working directory and stores it in the go folder.

Now, run the tldr binary to deploy the TLDR manual to your local system.

$go/bin/tldr

Sample output:

Finally, copy the tldr binaries to your path.

$sudo mv tldr / usr/local/bin

Now it's time to look at some examples.

Tldr++ usage

Enter the tldr command with no options to display all command examples in alphabetical order.

Use the up / down arrows to browse the command, type any letter to search or type the name of the command to see an example of the corresponding command. ? To browse for more messages, press Ctrl+c to return / exit.

To display a sample command for a specific command, such as apt, you can do this:

$tldr apt

Select any sample command from the list and press enter. You will see a * symbol before the selected command. For example, I chose the first command, sudo apt update. Now, it will ask you if you want to continue. If the command is correct, simply type y to continue and enter the sudo password to run the selected command.

Did you see that? You don't need to copy / paste or type the actual command in the terminal. Just select it from the list and run as fast as you can!

There are hundreds of examples of Linux commands in the Tldr manual. You can choose one or two commands a day and learn them thoroughly. Keep practicing like this every day and master as much as you can.

Using Tldr++ to dynamically learn and practice Linux commands

Now go back to the scene I mentioned in the first paragraph. You need to download a file, extract it, move it to a different location, and make it executable. Let's take a look at how to interact with the Tldr++ client.

(1) step 1-download files from the Internet

To download files using the command line, we mainly use the curl or wget command. Let me download the file using wget. To open the TLDR page of the wget command, simply execute the following command:

$tldr wget

The following is an example of the wget command.

You can use the up / down arrows to browse the list of commands. Once you have selected the command of your choice, press enter. Here I chose the first order.

Now, enter the path to download the file.

You will then be asked to confirm that the command is correct. If the command is correct, simply type yes or y to start downloading the file.

We have downloaded the file. Let's continue to extract this file.

(2) step 2-decompress the downloaded files

We downloaded the tar.gz file. So I will open the tar page of the TLDR manual.

$tldr tar

You will see a list of sample commands. Browse through these examples to find out which command is appropriate to extract tar.gz (gzip format) files, and press enter. In our example, it is the third command.

Now you will be prompted to enter the path to the tar.gz file. Just enter the path and press enter. Tldr++ supports smart file prompts. This means that it automatically completes the file name as you type. Just press the TAB key to do it automatically.

If you download the file to another location, simply type the full path, such as / home/sk/Downloads/tldr_0.5.0_linux_amd64.tar.gz.

After entering the path of the file you want to extract, press enter, and then enter y to confirm.

(3) step 3-move files from one directory to another

We extracted the file. Now we need to move the file to another location. To move files from one location to another, we use the mv command. So, let's open the mv command in the TLDR manual.

$tldr mv

Select the correct command to move the file from one location to another. In our example, the first command works, so let's select it.

Enter the file path you want to move, enter the destination path and press enter.

The above is all the contents of the article "how to use Tldr commands in linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report