You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Getting Redis running locally takes just a few minutes. This lesson walks through installation on macOS, Ubuntu/Debian Linux, and Windows (via WSL), plus how to verify the installation and connect with the Redis CLI.
The easiest way to install Redis on macOS is via Homebrew:
brew install redis
Start Redis as a background service managed by Homebrew:
brew services start redis
To start Redis manually in the foreground (useful for watching logs):
redis-server
sudo apt update
sudo apt install redis-server
Enable and start the service:
sudo systemctl enable redis-server
sudo systemctl start redis-server
sudo systemctl status redis-server
Redis does not have an official native Windows build. The recommended approach is to use Windows Subsystem for Linux (WSL2) and follow the Ubuntu steps above inside the WSL terminal.
Once the server is running, connect with the built-in command-line interface:
redis-cli
You will see the prompt 127.0.0.1:6379>. Test the connection:
127.0.0.1:6379> PING
PONG
PONG confirms the server is alive and responding.
redis-server --version
redis-cli --version
The configuration file is located at /etc/redis/redis.conf on Linux or /usr/local/etc/redis.conf on macOS. Key settings include:
# Via Homebrew on macOS
brew services stop redis
# Via systemctl on Linux
sudo systemctl stop redis-server
# From inside redis-cli
127.0.0.1:6379> SHUTDOWN NOSAVE
With Redis installed and the CLI working, you are ready to start storing and retrieving data.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.