Redis is an open-source, in-memory data structure store. It is used to store data in a fast and efficient way. To check if Redis is running on your system, you can use the following methods:

How to check if Redis is running on Linux Ubuntu, Mint and Debian

Open a terminal and run the following command:

systemctl status redis

If Redis is running, you will see the following output:

● redis.service - Redis in-memory data structure store
Loaded: loaded (/lib/systemd/system/redis.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2023-03-09 12:42:57 UTC; 1min 2s ago
Docs: https://redis.io/

    Main PID: 13436 (redis-server)
    Tasks: 1 (limit: 4915)
    CGroup: /system.slice/redis.service
            └─13436 /usr/bin/redis-server 127.0.0.1:6379

Another way is to use the Redis ping command, run the following command in terminal:

redis-cli ping

If Redis is running, you will see the following output:

PONG

I really like this kind of good mood 😀

How to check if Redis is running on Windows or MacOS

If you are running Redis on Windows or macOS, you can use the ping command as well.

redis-cli ping

PONG

How to check if Redis is running on another server

If you are not connected to the server where you must check Redis, or if you need to check if Redis is up and listening on a remote server, you can call the ping command with host and port options:

redis-cli -h host_url -p 6379 ping

Where:

  • host_url is the IP address of the server
  • p is the port, by default: 6379

Additional tips

  • You can also use the redis-cli info command to get more information about the Redis server, such as the number of connected clients and the amount of memory used.
  • If you are using a managed Redis service, such as Redis Labs or AWS ElastiCache, you can check the status of your Redis instance in the service’s dashboard.