Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to start redis command from command line?


Asked by Leia Lozano on Dec 01, 2021 Redis



You can start the Redis command line interface using “redis-cli” command. On your server, when you type redis-cli, you’ll get a Redis command line prompt as shown below. In this prompt you can type any Redis commands.
Similarly,
Following example explains how we can start Redis client. To start Redis client, open the terminal and type the command redis-cli. This will connect to your local server and now you can run any command. $redis-cli redis 127.0.0.1:6379> redis 127.0.0.1:6379> PING PONG
Moreover, redis-cli is the command that you type on Linux prompt to start the Redis command line interface 127.0.0.1:6379> – This is the redis prompt where you can type all Redis commands. 6379 is the default port on the local server (127.0.0.1) where the Redis server is running.
In respect to this,
sudo systemctl disable redis To check if Redis works perfectly on your system, run the Redis CLI command and populate it with string data. For example, the following command will load the Redis localhost server engine.
In addition,
This would run the PING command every 10th of a second. To generate some simple diagnostic information about the Redis instance you are connected to, simply run redis-cli with the –stat option. How many keys are set on the server. The server’s total memory usage. The total number of clients connected or blocked.