I'm using WSL on Windows 11 (with Ubuntu 22.04 LTS) and trying to use Elasticsearch on it. When I run
sudo systemctl start elasticsearch.service, I get the error:
System has not been booted with systemd as init system (PID 1). Can't operate.
I understand systemctl is not available on WSL. So, I tried its alternative, service elasticsearch start, but then I get the error: elasticsearch: unrecognized service.
I understand there's been similar phrased questions on this website but I have already tried the alternative command but it's not working. So, please help how I can resolve this issue.