Redis is a popular open-source in-memory data structure store used as a database, cache, and message broker. Redis has a lot of features and functionalities, which keep it ahead of the game. However, before working with Redis, it is essential to know the version of Redis installed on the system. In this article, we will discuss how to check the Redis version in Linux.
Checking the Redis Version using Redis-cli
Redis-cli is a command-line interface to interact with Redis. To check the Redis version using Redis-cli, first, log in to the Linux system where Redis is installed. Once you are logged in, open a terminal window and enter the following command:
redis-cli
This command will open the Redis-cli shell. Now, to check the Redis version, enter the following command in the Redis-cli shell:
redis-server --version
This command will display the Redis version installed on your system.
Checking the Redis Version using Redis-server
If you have access to the Redis configuration file (redis.conf), you can find the Redis version through it. To check the Redis version through the Redis-server configuration file, first, locate the Redis configuration file. Once you have located the redis.conf file, open it and look for the following line:
# Redis version
Next to this line, you will find the Redis version installed on your system.
Conclusion
Knowing the Redis version installed on your system is important to ensure compatibility with your existing application and to take advantage of the latest features and functionalities of Redis. Checking the Redis version can be easily performed through Redis-cli or the Redis configuration file, as we have discussed in this article. We hope this article will be helpful in checking the Redis version and using Redis efficiently.