REDISCLI_AUTH=secret redis-cli PING

Category: Databases & SQL

REDISCLI_AUTH=secret redis-cli PING

Authenticate without exposing the password

The REDISCLI_AUTH environment variable passes the password for this one command, keeping it out of the process list — safer than -a secret. Related: the AUTH command inside interactive mode.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.