Howtodojo logo
  • Home 
  • About 
  • Certifications 
  • Sample Database 
  • Cheatsheet 
  • Glossary 
  • Blog 
  • Tags 
  1.   Blog
  1. Home
  2. Blog
  3. How To Install Redis CLI on Ubuntu

How To Install Redis CLI on Ubuntu

Share via
Howtodojo
Link copied to clipboard

In this tutorial, we learn how to install Redis CLI on Ubuntu. This tutorial can be used in any version of Ubuntu including but not limited to Ubuntu 20.04/18.04/16.04.

On this page
Introduction   Install Redis CLI from Ubuntu Repository  
How To Install Redis CLI on Ubuntu

Introduction  

In this tutorial, we learn how to install Redis CLI on Ubuntu. This tutorial can be used in any version of Ubuntu including but not limited to Ubuntu 20.04/18.04/16.04.

Install Redis CLI from Ubuntu Repository  

We can install redis-cli from Ubuntu repository using the following commands.

First, we need to update the Ubuntu apt database using the command below

sudo apt update
```bash

As alternative command to update apt database, you can also run the command below

```bash
sudo apt-get update

After updating apt database we can install redis-cli using the command below:

sudo apt install redis-tools
```bash

## Install Redis CLI from PPA Repository {#h-install-redis-cli-from-ppa-repository}

In the previous step, we learned how to install `redis-cli` from the Ubuntu repository. If you need a newer version of redis-cli you can install a newer redis-tools package from the PPA repository.

First let's add the PPA repository using the command below:

```bash
sudo add-apt-repository ppa:redislabs/redis

Next step is to update apt metadata using the command below:

sudo apt update
```bash

We can also use apt-get command to update apt metadata using the command below:

```bash
sudo apt-get update

After updating apt database we can install Redis CLI using the command below:

sudo apt-get install redis-tools
```bash

As alternative, we can also use apt command to install Redis CLI using the command below:

```bash
sudo apt install redis-tools

To use redis cli we can use the command below

redis-cli -h <redis-server> -p <redis-port> 
```bash

Replace `<redis-server>` with the hostname or IP address of your redis server and `<redis-port>` with the redis port. Redis default port is `6379`.

## Video Tutorial





















    
        
    







        
        

        
            
                
                
                
            
        

        
## Summary {#h-summary} In this tutorial we learn how to install Redis CLI from Ubuntu repository and redislabs team PPA repository. Installing redis-cli might be necessary when you need to connect to a remote redis instance without having to install the redis server package. Until next time.
 Speedtest CLI on Ubuntu [How To Install]
How To Check the PostgreSQL Version 
On this page:
Introduction   Install Redis CLI from Ubuntu Repository  
Follow me

We publish tutorials, tips and tricks about Linux, open source, cloud computing, and infrastructure

     
Copyright © 2012 - 2025 howtodojo.com. |
Howtodojo
Code copied to clipboard