Hello everyone, I am your migrant worker brother.
All beginners who learn Linux systems know that in addition to simple system knowledge when getting started, secondly, the most important thing is to learn and understand the usage and application scenarios of Linux commands.
Therefore, everyone will also encounter such a situation, and we will search for information on commands that do not understand well. According to incomplete statistics, there are about 600+ common commands in the Linux system. It is too difficult to master them all at once, especially for a beginner, even more difficult.
In the background of the official account and technical exchange group, I often see that many people will encounter this kind of distress. If the command is not practiced or typed for a long time, it will soon be forgotten. When the application is applied, the help will be checked again. Ambiguous, it is impossible to find out the application of its use method and parameters.
Especially when multiple commands are required to complete a job, it is more difficult to write. Sometimes, even if someone in the group gives a relevant answer, it is still difficult for him to understand the meaning of it for a while? Why is it used in this way? Why do we need to use this parameter? A series of questions followed, but if you ask like this, it is inevitable that those who reply to you will be discouraged!
If there is a command interpreter tool at this time , it will be perfect!
So, today, the migrant worker gave everyone a practical and fun command learning artifact: kmdr.
Portal: https://github.com/ediardo/kmdr-cli
The power of kmdr is
If you have difficulty using Linux terminal commands, Kmdr can help you decrypt them. This is a useful tool, especially for beginner Linux users.
It can help you easily learn CLI commands without leaving the terminal or browsing through lengthy man pages. Kmdr not only provides Linux commands, but also provides explanations of many CLI commands
The support list is as follows
View the complete support list:
https://github.com/ediardo/kmdr-cli#supported-programs)
Install Kmdr CLI
kmdr is a free and open source tool developed with Nodejs , so the requirements for the installation environment are as follows:
Node.js v8.x and higher
Package manager, such as npm or yarn
The command to install kmdr using the npm package is as follows:
$ npm install kmdr @ latest --global
If you don’t want to install it, you can also use the online kmdr directly. The web address is as follows: http://demo.kmdr.sh/
macOS installation commands
brew install kommandr / tap / kmdr
Check the installation
Run the command kmdr to check if it is installed correctly on the system.
$ kmdr
Usage: kmdr [options] [command]
The ultimate CLI learning tool for explaining commands from your terminal
kmdr provides command explanations for hundreds of programs including git,
docker, kubectl, npm, go and more straight forward programs such as bash builtins.
Options:
-v, --version output the version number
-h, --help output usage information
Commands:
explain|e [options] Explain a shell command
upgrade|u Check for new releases
feedback|f Send feedback :)
kmdr can also be run in a container
The specific steps are as follows:
1. Build a mirror
docker build -t kmdr-cli
2. Run the container
docker run -it --rm kmdr-cli
Use Kmdr to display CLI command descriptions in the terminal
Let's take a more complicated command as an example to see how powerful kmdr is!
git commit -am "Initial commit"
First, run the following command to make kmdr enter the interpretation state:
$ kmdr explain
? Enter your command: git commit -am "Initial commit"
git commit -am "Initial commit"
EXPLANATION
git
The stupid content tracker
commit
Record changes to the repository
-a, --all
Tell the command to automatically stage files that have been modified and deleted
-m, --message Initial commit
Use the given <msg> as the commit message
EXAMPLES
git reset HEAD~1
Undo the most recent commit, keeping its changes in the filesystem
git commit -m "Initial commit"
Commit staged files to the repository with message "Initial commit"
git log -n 3 --oneline
Show only the first line of the last three commit messages
RELATED PROGRAMS
hg, lsof, systemctl, aria2c, dmesg, make
As can be seen from the above results, the power of kmdr is that it will split up a complex command and explain it to you one by one. Even the meaning of the parameters are explained clearly, allowing you to see at a glance Show the meaning.
Through this powerful artifact kmdr, even the most difficult commands can be explained to you through it, wherever you don’t understand, where you look, mom no longer has to worry that we won’t understand commands anymore!
Reference
Official website: https://kmdr.sh/
官方Twitter:http://twitter.com/kmdr_sh