# Logstash command not found

**URL:** <https://discuss.elastic.co/t/logstash-command-not-found/72112>\
**Category:** Logstash\
**Created:** [January 19, 2017, 4:48am UTC](https://discuss.elastic.co/t/logstash-command-not-found/72112 "2017-01-19T04:48:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gutasaputra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gutasaputra/32/10472_2.png) [@gutasaputra](https://discuss.elastic.co/u/gutasaputra)\
**Post date:** [January 19, 2017, 4:48am UTC](https://discuss.elastic.co/t/logstash-command-not-found/72112/1 "2017-01-19T04:48:58Z")

</div>

hi there, i want to deploy logstash in ubuntu server.  
i follow this tutorial :

> [Installing Logstash | Logstash Reference [8.11] | Elastic](https://www.elastic.co/guide/en/logstash/current/installing-logstash.html)

i start running logstash by using this comand :

> sudo systemctl start logstash.service

and then i try to see the logstash status :

> sudo systemctl status logstash.service

> ● logstash.service - logstash  
> Loaded: loaded (/etc/systemd/system/logstash.service; disabled; vendor preset: e  
> Active: active (running) since Thu 2017-01-19 04:44:35 UTC; 27s ago  
> Main PID: 10599 (java)  
> Tasks: 15  
> Memory: 369.6M  
> CPU: 21.081s  
> CGroup: /system.slice/logstash.service  
> └─10599 /usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSIn

and then i want to create my first stash.  
but when i want to execute my conf file.  
l\> ogstash -f first-pipeline.conf --config.test\_and\_exit

i will always get error like this

> logstash command not found

my ubuntu version :

> Distributor ID: Ubuntu  
> Description: Ubuntu 16.04.1 LTS  
> Release: 16.04  
> Codename: xenial

i install ELK on my osx environment, everything goes in right direction.  
idk why this happen on ubunut. please help me.

thank you

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 19, 2017, 7:14am UTC](https://discuss.elastic.co/t/logstash-command-not-found/72112/2 "2017-01-19T07:14:44Z")

</div>

I suppose your Logstash binary is installed in /usr/share/logstash/bin which isn't in your PATH so you have to specify the full path to it in your command.

---

<div class="post-metadata">

**Author:** ![gutasaputra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gutasaputra/32/10472_2.png) [@gutasaputra](https://discuss.elastic.co/u/gutasaputra)\
**Post date:** [January 19, 2017, 7:17am UTC](https://discuss.elastic.co/t/logstash-command-not-found/72112/3 "2017-01-19T07:17:19Z")

</div>

i tried this one several time magnusbaeck.

> root@research02:/usr/share/logstash/bin# logstash --version  
> logstash: command not found

---

<div class="post-metadata">

**Author:** ![gutasaputra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gutasaputra/32/10472_2.png) [@gutasaputra](https://discuss.elastic.co/u/gutasaputra)\
**Post date:** [January 19, 2017, 7:18am UTC](https://discuss.elastic.co/t/logstash-command-not-found/72112/4 "2017-01-19T07:18:15Z")

</div>

i tried this one several time magnusbaeck.

this is my command.

> root@research02:/usr/share/logstash/bin# logstash --version  
> logstash: command not found

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 19, 2017, 7:22am UTC](https://discuss.elastic.co/t/logstash-command-not-found/72112/5 "2017-01-19T07:22:51Z")

</div>

The current directory isn't listed in your path. If you want to run a program in the current directory you can use `./name-of-program` to reference it.

Over and out.

---

<div class="post-metadata">

**Author:** ![gutasaputra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gutasaputra/32/10472_2.png) [@gutasaputra](https://discuss.elastic.co/u/gutasaputra)\
**Post date:** [January 19, 2017, 7:28am UTC](https://discuss.elastic.co/t/logstash-command-not-found/72112/6 "2017-01-19T07:28:51Z")

</div>

thank you magnusbaeck.  
thanks alot.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 16, 2017, 7:28am UTC](https://discuss.elastic.co/t/logstash-command-not-found/72112/7 "2017-02-16T07:28:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
