How To Install Redis-cli?

How To Install Redis-cli?

redis-cli

Opens a connection to a Redis server.

Maintainer: Chris Lamb



Section: database

Install redis-cli

  • Debian apt-get install redis-tools Click to copy
  • Ubuntu apt-get install redis-tools Click to copy
  • Alpine OS apk add redis Click to copy
  • Arch Linux pacman -S redis Click to copy
  • Kali Linux apt-get install redis-tools Click to copy
  • Fedora dnf install redis Click to copy
  • Raspbian apt-get install redis-tools Click to copy
  • macOS brew install redis Click to copy

Opens a connection to a Redis server.

How to use redis-cli?

Below are few example commands for redis-cli that you can use in the terminal.

Connect to the local server:
redis-cliClick to copy
Connect to a remote server on the default port (6379):
redis-cli -h hostClick to copy
Connect to a remote server specifying a port number:
redis-cli -h host -p portClick to copy
Specify a password:
redis-cli -a passwordClick to copy
Execute Redis command:
redis-cli redis_commandClick to copy
To install the latest version of redis-cli in your favorite operating system just copy the redis-cli installation command from above and paste it into terminal. It will download and install the latest version of redis-cli 2026 package in your OS.