$linuxjunkies
>

cheat(1)

Display practical examples and cheatsheets for command-line tools directly in your terminal.

UbuntuDebianFedoraArch

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

FlagWhat it does
-l, --listlist all available cheatsheets
-e, --edit COMMANDedit or create a cheatsheet for COMMAND
-d, --delete COMMANDdelete a cheatsheet for COMMAND
-s, --search KEYWORDsearch cheatsheets for lines matching KEYWORD
-t, --tagslist all tags from cheatsheets
-r, --randomdisplay a random cheatsheet
-c, --colorizesyntax-highlight output (if available)
--initinitialize cheat configuration and directories

Examples

display common tar command examples and usage patterns

cheat tar

list all available cheatsheets on the system

cheat -l

open an editor to create or edit a grep cheatsheet

cheat -e grep

search all cheatsheets for lines containing 'regex'

cheat -s regex

display a random cheatsheet for learning

cheat -r

show the first 20 lines of the find cheatsheet

cheat find | head -20

delete the custom cheatsheet for 'mycommand'

cheat -d mycommand

display all available tags used in cheatsheets

cheat -t

Related commands