This article introduces a Linux Super command, with this command, you can happily use the various commands on Linux.
When you want to execute a linux command, what do you usually do when the command parameter options are numerous? Yes, most of us would go to the man command for help. In addition, the help-related commands on Linux are commands such as "assist", "Whereis", "Whatis", and so on.
Of course, on Linux, the Man command is almost omnipotent, but it is not the most efficient. Especially for the English is not very good children's shoes, the man command given the help information is very long, in a short period of time not understanding. As shown, is a man-given help information page:
Likewise, the information given by the "help" command is usually not what you want, such as:
Other commands such as "Whereis" and "Whatis" do not help you to understand the use of commands.
Now the protagonist of this article has appeared. --cheat
What's the cheat command for?
The cheat command simply tells you how a command is used. It does not provide any additional extraneous information, only by using an instance to tell you how a command is used.
For example, you want to know how to unzip the command tar, what options parameters are available, and so on. Just need a simple input
$ Cheat Tar
The effect is as follows:
OK, we know how sharp cheat is, and then we'll see how to install the Cheat command on our machine.
The cheat command relies on Python and Pip, so you need to install Python and Pip on the machine before installing the Cheat command. (Linux is installed with Python by default.) )
First, install Python
# Apt-get Install Python (on Debian based Systems)
# yum Install Python (on RedHat based Systems)
Second, install Pip
# Apt-get Install Python-pip (on Debian based Systems)
# yum Install Python-pip (on RedHat based Systems)
Third, download and install cheat
We download cheat via git, so we'll install the Git tool here first. Of course, if you don't want to use git tools, you can get the cheat installation files in other ways, this article uses the Git tool to get cheat.
1) Install Git
# Apt-get Install git (on Debian based Systems)
# yum Install git (on RedHat based Systems)
2) Install Python dependent files
# pip Install docopt pygments
3) Cloning a project from GitHub
# git clone https://github.com/chrisallenlane/cheat.git
4) switch to the cheat path for installation
# CD Cheat
# python setup.py Install
5) If all goes well, you will get the following results
# cheat-v
Cheat 2.0.9
Iv. Configuration Cheat
1) Add editor environment variable
Open the File Bash profile: ' ~WWW.QIXOO.QIXOO.COM/.BASHRC ', add the following line to the ~QKXUE.NET/.BASHRC:
Export EDITOR =/usr/bin/nano
Note: The nano in the/usr/bin/nano above is the name of the editing tool, and you can replace the Nano editor with your own favorite editor.
2) Add auto-complete function for cheat command
In order for the cheat command to have auto-complete function, only need to download ' Cheat.bash ' and copy it to the appropriate path, the operation is as follows:
# wget Https://github.com/chrisallenlane/cheat/raw/master/cheat/autocompletion/cheat.bash
# MV Cheat.bash/etc/bash_completion.d/
For more information about auto-completion, refer to this article: Auto completion Script for Various shells
3) Highlight (optional)
In addition, you can configure highlighting for better display results. To turn on highlighting, you can add the following line to your '. BASHRC ' file:
Export Cheatcolors=true
4) Add more small copy (optional)
By default, the cheat command only supports basic Linux commands and some commonly used commands. To add additional command support, you can go to path ~/.cheat/to enrich cheat supported command set by manipulating Cheatsheets.
# CHEAT-E XYZ
The above command will open the command xyz if the corresponding Cheat-sheet is available. Otherwise cheat will create a cheat-sheet.
Five, look at a few examples
1) Cheat tar command
2) Cheat DD command
3) Cheat uname command
4) Cheat Ifconfig command
5) Cheat Top command
6) cheat-l Command
This usage is, by definition, a list of cheat that support those command queries.
So much, Enjoy Linux,enjoy cheat!.
a cheat command = = Linux command small copy Daquan