// tag::deb[]

The DEB package includes a service unit for Linux systems with systemd. On these
systems, you can manage {agent} by using the usual systemd commands.

// tag::stop-command[]
Use `systemctl` to stop the agent:

[source,shell]
----
sudo systemctl stop elastic-agent
----

Otherwise, use:

[source,shell]
----
sudo service elastic-agent stop
----

NOTE: {agent} will restart automatically if the system is rebooted.

// end::stop-command[]

// end::deb[]

// tag::rpm[]
The RPM package includes a service unit for Linux systems with systemd. On these
systems, you can manage {agent} by using the usual systemd commands.

include::stop.asciidoc[tag=stop-command]

// end::rpm[]

// tag::mac[]

[source,shell]
----
sudo launchctl unload /Library/LaunchDaemons/co.elastic.elastic-agent.plist
----

NOTE: {agent} will restart automatically if the system is rebooted.

// end::mac[]

// tag::linux[]
[source,shell]
----
sudo service elastic-agent stop
----

NOTE: {agent} will restart automatically if the system is rebooted.

// end::linux[]

// tag::win[]

[source,shell]
----
Stop-Service elastic-agent
----

If necessary, use Task Manager on Windows to stop {agent}. This will kill the
`elastic-agent` process and any sub-processes it created (such as {beats}).

NOTE: {agent} will restart automatically if the system is rebooted.

// end::win[]
