HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Redis commands for performing operations on a redis service.
To execute a command requires a client on redis redis service. Redis client before we redis downloaded the installation package.
The basic syntax Redis client is:
$ redis-cli
The following example explains how to start redis client:
Start redis client, open a terminal and enter the commandredis-cli.This command will connect local redis service.
$redis-cli redis 127.0.0.1:6379> redis 127.0.0.1:6379> PING PONG
In the above example we connect to the local redis service and execute thePING command, which is used to detect redis service is started.
If you need to execute commands on a remote redis service is alsoredis-cli command we use.
$ redis-cli -h host -p port -a password
The following example demonstrates how to connect to the host 127.0.0.1, port 6379, the password on mypass redis service.
$redis-cli -h 127.0.0.1 -p 6379 -a "mypass" redis 127.0.0.1:6379> redis 127.0.0.1:6379> PING PONG