Skip to content

Redis Commands Cheat Sheet

Redis Commands Cheat Sheet

Data Type Operations

Command Description
SET Set the string value
GET Get the string value
DEL Delete a key
EXISTS Check if a key exists
HSET Set the value of a hash field
HGET Get the value of a hash field
LPUSH Insert value at the head of a list
RPUSH Insert value at the tail of a list
LPOP Remove and return the head value of a list
RPOP Remove and return the tail value of a list
SADD Add members to a set
SMEMBERS Get all members of a set

Transactions

Command Description
MULTI Start a transaction
EXEC Execute the transaction
DISCARD Discard the transaction

Cluster Management

Command Description
CLUSTER INFO Get cluster status
CLUSTER NODES List cluster nodes
CLUSTER MEET Add a node to the cluster

Server Management

Command Description
INFO Get server info and statistics
CONFIG GET Get configuration parameters
CONFIG SET Set configuration parameters

Scripting

Command Description
EVAL Execute a Lua script
SCRIPT LOAD Load script into the script cache

Publish and Subscribe

Command Description
PUBLISH Send a message to a channel
SUBSCRIBE Subscribe to a channel
UNSUBSCRIBE Unsubscribe from a channel