Redis


Commands:

We’ll use the redis-cli tool.

  • redis-cli -h <server_ip> [-p <server_port>] [-a <password>]
  • redis-cli -h <server_ip> [-p <server_port]

Once you’re connected, you can use the following redis commands:

  • info: Get informations and statistics about the server. The relevent category to look for is: keyspace, and server (to get possible the Redis version).
  • select <index_of_database>: If the keyspace says for example: db0:keys=4, you need to go on the db0, so use: select 0.
  • keys <pattern>: Find all keys matching the given pattern. Wildcards are enabled. So keys * will list everything in the database.
  • get <key>: Get the value of a key.