Hello there!
If you run Elasticsearch directly, you can stop Elasticsearch by sending control-C. If you are running Elasticsearch on the console, or by sending SIGTERM to the Elasticsearch process on the POSIX system, you can get the PID through various tools (such as ps or jps).
Send signal:
$ jps | grep Elasticsearch
14542 Elasticsearchor