Skip to content

Redis Commands Cheat Sheet

Redis Commands Cheat Sheet

Data Type Operations

Command Description
SET Set the string value of a key
GET Get the string value of a key
DEL Delete a key
EXISTS Check if a key exists
HSET Set the string value of a hash field
HGET Get the value of a hash field
LPUSH Prepend one or multiple values to a list
RPUSH Append one or multiple values to a list
LPOP Remove and get the first element in a list
RPOP Remove and get the last element in a list
SADD Add one or more members to a set
SMEMBERS Get all the members in a set

Transaction Processing

Command Description
MULTI Mark the start of a transaction block
EXEC Execute all commands issued after MULTI
DISCARD Discard all commands issued after MULTI

Cluster Management

Command Description
CLUSTER INFO Provides info about Redis Cluster node state
CLUSTER NODES Get Cluster nodes configuration for the node
CLUSTER MEET Force a node to join the cluster

Server Management

Command Description
INFO Get information and statistics about the server
CONFIG GET Get the value of a configuration parameter
CONFIG SET Set a configuration parameter to the given value

Scripting

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

Publish and Subscribe

Command Description
PUBLISH Post a message to a channel
SUBSCRIBE Listen for messages published to the given channels
UNSUBSCRIBE Stop listening for messages posted to the given channels