203
votes

how to check Redis server version?

I've found in Redis site this command:

$ redis-server

and that should give me (according to the site):

[28550] 01 Aug 19:29:28 # Warning: no config file specified, using the default config. In order to specify a config file use 'redis-server /path/to/redis.conf'
[28550] 01 Aug 19:29:28 * Server started, Redis version 2.2.12
[28550] 01 Aug 19:29:28 * The server is now ready to accept connections on port 6379
... and so forth ...

but I get this instead:

[8719] 04 Feb 14:51:09.009 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
[8719] 04 Feb 14:51:09.009 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
[8719] 04 Feb 14:51:09.009 # Creating Server TCP listening socket *:6379: bind: Address already in use

Which mean I need to configure it, but all I want is the version!

So how do I check Redis server version?

6

6 Answers

341
votes

$ redis-server --version

gives you the version.

192
votes

Run the command INFO. The version will be the first item displayed.

The advantage of this over redis-server --version is that sometimes you don't have access to the server (e.g. when it's provided to you on the cloud), in which case INFO is your only option.

18
votes

To support the answers given above, The details of the redis instance can be obtained by

$ redis-cli
$ INFO

This gives all the info you may need

# Server
redis_version:5.0.5
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:da75abdfe06a50f8
redis_mode:standalone
os:Linux 5.3.0-51-generic x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:7.5.0
process_id:14126
run_id:adfaeec5683d7381a2a175a2111f6159b6342830
tcp_port:6379
uptime_in_seconds:16860
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:15766886
executable:/tmp/redis-5.0.5/src/redis-server
config_file:

# Clients
connected_clients:22
....More Verbose

The version lies in the second line :)

17
votes

There are two commands, which you can use to check the version of redis

    redis-server -v

or

    redis-server --version
15
votes

if you want to know a remote redis server's version, just connect to that server and issue command "info server", you will get things like this:

...
redis_version:3.2.12
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:9c3b73db5f7822b7
redis_mode:standalone
os:Linux 2.6.32.43-tlinux-1.0.26-default x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.9.4
process_id:5034
run_id:a45b2ffdc31d7f40a1652c235582d5d277eb5eec
4
votes

To get the version of Redis server

redis-server -v

To get the version of Redis client

redis-cli -v