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.
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 systemsThen install pip:
# apt-get install python-pip # Debian # yum install python-pip # RedHatNext, install git (required to clone the cheat repository):
# apt-get install git # Debian # yum install git # RedHatInstall 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 installVerify the installation:
# cheat -v cheat 2.0.9Configuration
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 xyzExamples
cheat tar (output shown below):
cheat dd:
cheat uname:
cheat ifconfig:
cheat top:
cheat -l (list all cheat sheets):
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.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
