Use the cheat tool in Linux to learn how to use system commands

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.