cheat(1)
Display practical examples and cheatsheets for command-line tools directly in your terminal.
Synopsis
cheat [OPTION]... [COMMAND]Description
cheat is a command-line reference tool that displays concise, practical examples for Linux commands and tools. Instead of reading through lengthy man pages, users can quickly access community-contributed cheatsheets with real-world usage examples.
Cheatsheets are stored as plain text files and can be created, edited, or shared easily. The tool supports both built-in cheatsheets and custom user-created ones, making it ideal for quick lookups while working on the command line.
Common options
| Flag | What it does |
|---|---|
-l, --list | list all available cheatsheets |
-e, --edit COMMAND | edit or create a cheatsheet for COMMAND |
-d, --delete COMMAND | delete a cheatsheet for COMMAND |
-s, --search KEYWORD | search cheatsheets for lines matching KEYWORD |
-t, --tags | list all tags from cheatsheets |
-r, --random | display a random cheatsheet |
-c, --colorize | syntax-highlight output (if available) |
--init | initialize cheat configuration and directories |
Examples
display common tar command examples and usage patterns
cheat tarlist all available cheatsheets on the system
cheat -lopen an editor to create or edit a grep cheatsheet
cheat -e grepsearch all cheatsheets for lines containing 'regex'
cheat -s regexdisplay a random cheatsheet for learning
cheat -rshow the first 20 lines of the find cheatsheet
cheat find | head -20delete the custom cheatsheet for 'mycommand'
cheat -d mycommanddisplay all available tags used in cheatsheets
cheat -t