Operations 7 min read

Master Linux Cheat: Quick Command Reference and Installation Guide

This article introduces the Linux cheat utility as a concise alternative to man, explains its purpose, provides step‑by‑step installation instructions—including Python, pip, and git setup—covers configuration for editors and autocomplete, and showcases practical examples for common commands.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Linux Cheat: Quick Command Reference and Installation Guide

When you need to execute a Linux command with many options, most people turn to man, help, whereis, or whatis, but these can be verbose and hard to read, especially for non‑native English speakers.

The cheat command offers a lightweight solution by showing only practical usage examples for a command.

Example: $ cheat tar The output (shown in the image below) displays concise examples of the tar command.

Installation

cheat depends on Python and pip. Install Python first:

# apt-get install python    # On Debian‑based systems
# yum install python        # On RedHat‑based systems

Then install pip:

# apt-get install python-pip    # Debian
# yum install python-pip        # RedHat

Next, install git (required to clone the cheat repository):

# apt-get install git    # Debian
# yum install git        # RedHat

Install Python dependencies for cheat: # pip install docopt pygments Clone the cheat source from GitHub: # git clone https://github.com/chrisallenlane/cheat.git Enter the directory and install:

# cd cheat
# python setup.py install

Verify the installation:

# cheat -v
cheat 2.0.9

Configuration

Add an editor variable to ~/.bashrc (replace nano with your preferred editor): export EDITOR=/usr/bin/nano Enable autocomplete by downloading the script and moving it to the completion directory:

# wget https://github.com/chrisallenlane/cheat/raw/master/cheat/autocompletion/cheat.bash
# mv cheat.bash /etc/bash_completion.d/

Optional: enable syntax highlighting: export CHEATCOLORS=true Optional: add additional cheat sheets by placing files in ~/.cheat/ or editing with:

# cheat -e xyz

Examples

cheat tar (output shown below):

cheat dd:

cheat uname:

cheat ifconfig:

cheat top:

cheat -l (list all cheat sheets):

Linuxcommand-line toolsInstallation Guidecheat command
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.