// tag::deb[]

:beatname_url: {beats-ref-root}/{beatname_lc}/{branch}

["source","sh",subs="attributes"]
----
sudo service {beatname_pkg} start
----

// tag::initd-note[]
NOTE: If you use an `init.d` script to start {beatname_uc}, you can't specify command
line flags (see {beatname_url}/command-line-options.html[Command reference]). To specify flags, start {beatname_uc} in
the foreground.

// end::initd-note[]

Also see {beatname_url}/running-with-systemd.html[{beatname_uc} and systemd].
// end::deb[]

// tag::rpm[]
["source","sh",subs="attributes"]
----
sudo service {beatname_pkg} start
----

include::start.asciidoc[tag=initd-note]

Also see {beatname_url}/running-with-systemd.html[{beatname_uc} and systemd].

// end::rpm[]

// tag::mac[]
["source","sh",subs="attributes,callouts"]
----
./{beatname_lc} -e
----
// end::mac[]

// tag::brew[]
To have launchd start +elastic/tap/{beatname_lc}+ and then restart it at login,
run:

["source","sh",subs="attributes"]
-----
brew services start elastic/tap/{beatname_lc}-full
-----

To run {beatname_uc} in the foreground instead of running it as a background
service, run:

["source","sh",subs="attributes"]
-----
{beatname_lc} -e
-----

// end::brew[]

// tag::linux[]

["source","sh",subs="attributes,callouts"]
----
./{beatname_lc} -e
----

// end::linux[]

// tag::win[]
["source","sh",subs="attributes"]
----
PS C:{backslash}Program Files{backslash}{beatname_lc}> Start-Service {beatname_lc}
----

By default, Windows log files are stored in +C:{backslash}ProgramData{backslash}{beatname_lc}\Logs+.

// end::win[]
