Company
Date Published
Author
Chris Miller
Word count
1176
Language
English
Hacker News points
None

Summary

You can run a local instance of the Redis database from Windows Subsystem (WSL) for Linux, which is a compatibility layer that lets you run Linux binary executables on Windows. To do this, first install WSL 2 by running `wsl --install` in an elevated shell. After installation, you'll see a Ubuntu shell and can start installing the Redis database using `sudo apt-get update`, `sudo apt-get upgrade`, and `sudo apt-get install redis-server`. Once installed, you can start and stop the Redis server using `sudo service redis-server status`, `sudo service redis-server start`, and `sudo service redis-server stop`. To avoid entering a password every time, you can add a file to `/etc/sudoers.d` with a specific command that removes the root password requirement for the `redis-server` service. This allows you to run WSL commands without being prompted for a password. Additionally, you can create shortcuts in your PowerShell profile to simplify common Redis commands and even configure Redis to start automatically on Windows boot-up by creating a batch file in the startup folder.