Use the cheat tool in Linux to learn how to use system commands
Cheat is a tool that is very suitable for Linux system administrators. It helps you quickly and easily get familiar with the use of system commands in Linux, such:
Cheat installation is simple:
Cheat has two dependent tools: python and pip. Therefore, you must install python and pip before installing cheat.
# Yum install python
# Yum install python-pip
Download cheat through git:
# Apt-get install git
Then install python dependencies:
# Pip install docopt pygments
Clone cheat from git:
# Git clone https://github.com/chrisallenlane/cheat.git
Go to the cheat directory and run setup. py.
# Cd cheat
# Python setup. py install
The installation is complete. You can view the cheat version.
# Cheat-v
Cheat 2.1.0
Other cheat configurations:
In ~ /. Configure a default text editor for bashrc.
# Export EDITOR =/usr/bin/vi
This text editor can be set according to your preferences. You can set other options, such as nano.
If you need the auto-completion function of cheat, you can copy the script cheat. bash on git as follows:
# Wget https://github.com/chrisallenlane/cheat/raw/master/cheat/autocompletion/cheat.bash#c
# Mv cheat. bash/etc/bash_completion.d/
Cheat can also customize the Command help file according to your needs. The custom directory is ~ In the/. cheat/directory, Let's first look at the directory of the cheat Command help file:
# Cheat-d
/Root/. cheat
/Usr/lib/python2.7/site-packages/cheat/cheatsheets
# Cp/usr/lib/python2.7/site-packages/cheat/cheatsheets/*/root/. cheat/
We can copy all the files in/usr/lib/python2.7/site-packages/cheat/cheatsheets to/root /. in cheat, you can also create your own other command help memo files as needed.
In this way, the cheat tool is installed, and you can make good use of it without remembering how to use the commands in the future.
Linux Command cd
Cat for Linux commands
Linux Command alias/unalias
Linux Command Parsing: su root and su-root
Interactive input of Linux commands read
This article permanently updates the link address: