Redis 8 cheatsheet

Redis 8: Connecting

5 common Redis 8 tasks.

Open the CLI

Connect to a local server on the default port.

redis-cli

Connect to a remote server

Connect with a user, prompting for the password so it stays out of shell history.

redis-cli -h redis.example.com -p 6379 --user app --askpass

Test the connection

Check that the server is reachable. It replies PONG.

PING

Switch database

Select numbered database 1.

SELECT 1

Show server information

Show version, uptime and other details. Use sections such as INFO memory.

INFO server

Was this page helpful?