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

What commands do you need to remember to learn Linux?

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

Share

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

This article will explain in detail what commands you need to remember in learning Linux. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Tldr (Command Manual)

As a developer, terminal commands are often used, but the biggest headache is that I can't remember the tedious parameters. The search efficiency of Googe Duniang is low, and the results displayed by man command are not easy to read.

The Tldr command is the solution to this pain point.

What is Tldr? Its GitHub page translation is "a concise community-driven help manual", which is the best explanation for it, according to the 28 principles to give examples of common scenarios of commands, easy to read, friends from all over the world can submit content to this command library on Github, it is completely community-driven.

The man command is described in more detail, and from a practical point of view, tldr is the king.

Tip: it can run in nearly 20 languages and update the local command library through tldr-update.

Tree (tree directory)

When we write project documents, this small command can come in handy if we want to express the project structure and content more visually, arranging directories and files in an image-like tree view.

Tip: support customization levels, filtering content and other personalized settings. View specific usage examples through tldr tree. Add-N parameter to solve the problem of Chinese garbled.

Rlwrap (Historical Command)

Students who often use commands must have a habit of switching historical commands by pressing the up and down keys, but the headache is that telnet commands do not support switching, or even backspace deletion, so they often encounter the following awkward situations. Don't worry, rlwrap is used to solve this pain point.

Execute the Dubbo interface through telnet:

Connect to the memcached server through telnet:

What is rlwrap? It is based on the readline library to achieve command line completion and recording of wrapper commands. Nowadays, interactive input is the most basic requirement. Linux records users' operations through readline, and realizes the functions of interactive input, automatic completion, search and so on. Rlwrap is the best partner for commands that do not support readline operations.

Usage: add the telnet command before executing the rlwrap command.

Tip: in addition to the fact that the telnet command does not support Readline requires rlwrap wrapper, Oracle's sqlplus, rman, asmcmd and other commands can also switch up and down through rlwrap.

Shortcut alias: alias telnet='rlwrap telnet' (record session output).

In many cases, for the sake of security and backup, the work content needs to be saved. In that case, the command is the recorder hidden in the terminal, which can record all the contents of the terminal session and form a file. For students who need to leave a mark on their work, it is a good medicine.

How to use it?

Start it with, and it has already started recording. When you are done, exit the record with exit, and a file called "type" is generated by default.

Tip: in what scenarios can you use it?

1. I need to push a large number of videos to CDN, which takes one night. At this time, by recording the log of execution, we will do separate processing for those that have not been successfully pushed the next day.

2. Someone remotes your server or computer, just to be safe.

3. When you work with a colleague, you have done half of your work and give it to another person to do it. Send him yours at this time and let him continue.

……

Autojump (direct access with one click)

The last finale artifact is probably one of the most frequently used commands by programmers.

I believe that the commands most frequently used by most end users are cd and ls. When I don't know where to switch to, I have to ls to confirm the directory name, so repeatedly, it may take several or even ten times of cd to reach the desired directory, and how much wind and rain it took to find my file. As the saying goes, "programmers who will not be lazy are not good programmers". It is not our style to suffer so many setbacks, so with the birth of autojump, it is destined to be extraordinary.

As the name implies, autojump automatically jumps, rather than switching, because it can be done directly with one click.

Tip: you can view its database through the j-s command, as well as the directory weights in the database.

This is the end of this article on "which commands to remember in learning Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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