In fast-paced technical environments, where efficiency and accuracy are paramount, tools like cheat become essential. This powerful command-line utility lets you create, manage, and view both personal and community-driven cheatsheets directly from your terminal.
What Is cheat?
cheat is a lightweight CLI utility (written in Go) designed for quick access to practical examples of command usage. While man pages offer extensive documentation and tldr gives community-written summaries, cheat fills a vital niche: custom, executable, and editable command notes for your day-to-day terminal operations.
This makes it especially helpful when working with:
- Complex commands (
awk,sed,iptables, etc.) - Workflow-specific variations (e.g., different
dockerconfigurations per environment) - Rarely used but essential options or syntax
Why Not Just Use man, tldr, or Aliases?
manpages are comprehensive but often verbose and slow to navigate.tldris great for quick community-written summaries but not customizable out-of-the-box.- Aliases or
.bashrc/.zshrcentries are limited and not meant for structured documentation.
With cheat, you gain:
- Centralized, searchable documentation of your most-used commands
- Personal cheatsheets tailored to your tools, team, and environments
- Fully offline access once initialized
Installing cheat on Linux
For Debian/Ubuntu-based systems:
sudo apt update && sudo apt install cheat
Using Snap or Homebrew (also works on macOS):
sudo snap install cheat
# or on macOS
brew install cheatCode language: PHP (php)
On Arch Linux:
yay -S cheat
# or
sudo pacman -S cheatCode language: PHP (php)
Manual installation (latest binary from GitHub):
cd /tmp
wget https://github.com/cheat/cheat/releases/download/4.4.2/cheat-linux-amd64.gz
gunzip cheat-linux-amd64.gz
chmod +x cheat-linux-amd64
sudo mv cheat-linux-amd64 /usr/local/bin/cheatCode language: JavaScript (javascript)
First-Time Setup
Just run cheat once to trigger automatic configuration:
cheat
This will:
- Generate
~/.config/cheat/conf.yml - Set up default
cheatpaths - Download community cheatsheets
For better readability, edit your config and enable color output:
colorize: trueCode language: JavaScript (javascript)
Creating Personal Cheatsheets
Here’s where cheat shines.
To create a cheatsheet for your docker networking commands:
cheat -e docker/networking
Example content:
---
syntax: Docker Networking
tags: [ docker, networking ]
---
// List networks
docker network ls
// Inspect bridge network
docker network inspect bridge
// Create a bridge
docker network create -d bridge dev-netCode language: JavaScript (javascript)
Later, simply retrieve it with:
cheat docker/networking
Search and Organization
cheat includes powerful search capabilities:
cheat -l # List all cheatsheets
cheat -l -p personal # List personal only
cheat -l -t docker # List by tag
cheat -s docker-compose # Search string
cheat -r -s 'kubectl.*get' # Regex searchCode language: PHP (php)
You can also view cheat paths:
cheat -d
Pro Tips for DevOps Teams
- ✅ Sync cheatsheets with Git across your team.
- ✅ Store by role:
devops/kubernetes,security/audit,infra/networking - ✅ Add shell aliases for fast access:
alias cheat-k8s='cheat devops/kubernetes'Code language: JavaScript (javascript)
Integration With Other Tools
- Works well alongside
tldr,bat,fzf, andripgrep - Version control your personal cheatsheets in
~/.config/cheat/cheatsheets/personal/ - Can be used even on macOS (via Homebrew), making it cross-platform friendly
Final Thoughts
cheat is more than a utility—it’s your own terminal knowledge base. For sysadmins, SREs, or anyone who juggles multiple tools and environments daily, it can significantly speed up your workflow while reducing cognitive overhead.
Combined with Git for version control and organized into roles or topics, it becomes an indispensable tool in modern Linux systems administration.
