By default, Elasticsearch runs in the foreground, prints its logs to the
standard output (stdout), and can be stopped by pressing Ctrl-C.

All scripts packaged with Elasticsearch require a version of Bash
that supports arrays and assume that Bash is available at /bin/bash.
As such, Bash should be available at this path either directly or via a
symbolic link.

If you installed Elasticsearch on Windows with a .zip package, you can start Elasticsearch from
the command line. If you want Elasticsearch to start automatically at boot time without
any user interaction, install Elasticsearch as a service.

Elasticsearch is not started automatically after installation. How to start
and stop Elasticsearch depends on whether your system uses SysV init or
systemd (used by newer distributions). You can tell which is being used by
running this command:

These commands provide no feedback as to whether Elasticsearch was started
successfully or not. Instead, this information will be written in the log
files located in /var/log/elasticsearch/.

By default the Elasticsearch service doesn’t log information in the systemd
journal. To enable journalctl logging, the --quiet option must be removed
from the ExecStart command line in the elasticsearch.service file.

When systemd logging is enabled, the logging information are available using
the journalctl commands:

To tail the journal:

sudo journalctl -f

To list journal entries for the elasticsearch service:

sudo journalctl --unit elasticsearch

To list journal entries for the elasticsearch service starting from a given time:

If you installed a Docker image, you can start Elasticsearch from the command line. There
are different methods depending on whether you’re using development mode or
production mode. See Running Elasticsearch from the command line.

If you installed Elasticsearch on Windows using the .msi package, you can start Elasticsearch
from the command line. If you want it to start automatically at boot time
without any user interaction,
install Elasticsearch as a Windows service.

Elasticsearch is not started automatically after installation. How to start
and stop Elasticsearch depends on whether your system uses SysV init or
systemd (used by newer distributions). You can tell which is being used by
running this command:

These commands provide no feedback as to whether Elasticsearch was started
successfully or not. Instead, this information will be written in the log
files located in /var/log/elasticsearch/.

By default the Elasticsearch service doesn’t log information in the systemd
journal. To enable journalctl logging, the --quiet option must be removed
from the ExecStart command line in the elasticsearch.service file.

When systemd logging is enabled, the logging information are available using
the journalctl commands:

To tail the journal:

sudo journalctl -f

To list journal entries for the elasticsearch service:

sudo journalctl --unit elasticsearch

To list journal entries for the elasticsearch service starting from a given time: