Install redis server on Ubuntu

To install redis follow these steps

sudo apt-get update
sudo apt install redis-server

To check redis port number and ip address, use below command.

sudo netstat -tlpn|grep redis

Redis-cli, the Redis command line interface

redis-cli is command line interface that use to interact with redis server from command line or terminal. Vie redis-cli we can send commands to redis server and read response from server at terminal.

Few common commands to use at redis-cli.

To select database or change database.

select 1
select 2

To set key value

# example
set username "Ranjeet Singh"

To get key value

get KEY
# example
get username

Install redis server on Ubuntu
Tagged on:
Show Buttons
Hide Buttons