Dragonfly Cloud is now available in the AWS Marketplace - learn more

Question: How to see Redis version?

Answer

You can check the Redis version in two ways:

1. Using the Redis CLI

You can use the Redis CLI to query the Redis server to get its version number. Follow these steps:

  1. Open your terminal or command prompt.

  2. Type the following command and press enter:

    redis-cli INFO server
    

    This will display a lot of information about the Redis server, including its version.

  3. Look for the line that starts with redis_version:. The number next to it is the Redis version number.

Here's an example of what you should see when running this command on your local Redis server:

# Server
redis_version:5.0.7
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:ec878d9f782b240d
redis_mode:standalone
os:Darwin 18.7.0 x86_64
arch_bits:64
multiplexing_api:kqueue
atomicvar_api:atomic-builtin
gcc_version:4.2.1
process_id:12345
run_id:9a65e374bd02e6e8ea830f0c6a18009f34690019
tcp_port:6379
uptime_in_seconds:291761
uptime_in_days:3
hz:10
configured_hz:10
lru_clock:2157328
executable:/usr/local/bin/redis-server
config_file:/usr/local/etc/redis.conf

In this example, the Redis version is 5.0.7.

2. Using the Redis command-line options

You can also use the Redis command-line options to get the Redis version number. Follow these steps:

  1. Open your terminal or command prompt.

  2. Type the following command and press enter:

    redis-server --version
    

    This will display the Redis version number.

Here's an example of what you should see when running this command on your local Redis server:

Redis server v=5.0.7 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=ec878d9f782b240d

In this example, the Redis version is 5.0.7.

Was this content helpful?

White Paper

Free System Design on AWS E-Book

Download this early release of O'Reilly's latest cloud infrastructure e-book: System Design on AWS.

Free System Design on AWS E-Book

Switch & save up to 80% 

Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement. Instantly experience up to a 25X boost in performance and 80% reduction in cost