How to install Redis on WSL

In this article, we will discuss how to install redis on WSL. Redis is an in-memory key-value data structure store, used as a memory key-value database, cache, and message broker. Officially, the redis is not supported on Windows. However, we can run it on WSL (Windows Subsystem for Linux).

We will be using Windows 10 – Ubuntu WSL. Follow the steps to install Redis on WSL.

Update and upgrade Ubuntu

Run the following command to update and upgrade Ubuntu.

sudo apt update && apt upgrade

Install Redis on Ubuntu

Run the following command to install Redis server.

sudo apt install redis-server

Check the Redis client version using the following command.

redis-cli -v

Start the Redis server

Now we can start the server using the command

sudo service redis-server start

To check the status of the Redis server using the following command

sudo service redis-server status

Test Redis

To test the Redis, simply start the redis-client.

redis-cli

Simply store test data “site” and value as “nolowiz” and retrieve.

Install redis on WSL

Conclusion

There you have it, installing the Redis on WSL is easy.

Leave a Comment