# Help - I've hosed my cygwin and can't run ES anymore

**URL:** <https://discuss.elastic.co/t/help-ive-hosed-my-cygwin-and-cant-run-es-anymore/40491>\
**Category:** Elasticsearch\
**Created:** [January 29, 2016, 3:15pm UTC](https://discuss.elastic.co/t/help-ive-hosed-my-cygwin-and-cant-run-es-anymore/40491 "2016-01-29T15:15:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjdepaul](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jjdepaul](https://discuss.elastic.co/u/jjdepaul)\
**Post date:** [January 29, 2016, 3:15pm UTC](https://discuss.elastic.co/t/help-ive-hosed-my-cygwin-and-cant-run-es-anymore/40491/1 "2016-01-29T15:15:59Z")

</div>

I've installed more packages and now, when I run bin/elasticsearch I now get this:

```
-bash-4.3$ cd elasticsearch-2.1.0/
-bash-4.3$ bin/elasticsearch
bin/elasticsearch: line 75: dirname: command not found
bin/elasticsearch: line 84: dirname: command not found
bin/elasticsearch: line 125: uname: command not found
bin/elasticsearch: line 134: cut: command not found
bin/elasticsearch: line 138: grep: command not found
Error: Could not find or load main class org.elasticsearch.bootstrap.Elasticsear ch
-bash-4.3$

```

I've set the ES\_CLASSPATH var on my machine to:  
ES\_CLASSPATH='C:\elasticsearch-2.1.0\bin' and set the Path variable to include it too. Still get startup errors.

Please help me restore the operation in this shell.

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [January 29, 2016, 4:02pm UTC](https://discuss.elastic.co/t/help-ive-hosed-my-cygwin-and-cant-run-es-anymore/40491/2 "2016-01-29T16:02:23Z")

</div>

Try running `bin/elasticsearch.bat` directly. It looks like your cygwin environment is missing too many linux things for `bin/elasticsearch` to work properly.

---

<div class="post-metadata">

**Author:** ![jjdepaul](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jjdepaul](https://discuss.elastic.co/u/jjdepaul)\
**Post date:** [January 29, 2016, 4:23pm UTC](https://discuss.elastic.co/t/help-ive-hosed-my-cygwin-and-cant-run-es-anymore/40491/3 "2016-01-29T16:23:36Z")

</div>

You were absolutely right - ES does start with bin/elasticsearch.bat and that is the important thing.

Moreover, you've made me realize that I have only a portion of what I've had before in cygwin.

Thx -

---

<div class="post-metadata">

**Author:** ![jjdepaul](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jjdepaul](https://discuss.elastic.co/u/jjdepaul)\
**Post date:** [January 29, 2016, 5:46pm UTC](https://discuss.elastic.co/t/help-ive-hosed-my-cygwin-and-cant-run-es-anymore/40491/4 "2016-01-29T17:46:12Z")

</div>

For the benefit of others... I discovered that somehow I've lost CYGWIN\_HOME settings.

I've added CYGWIN\_HOME = C:\userprograms\cygwin, and also I've added C:\userprograms\cygwin\bin; to my Path variable.

Restarted the cygwin window and got everything back again. Thx -

---

<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:** [July 5, 2017, 11:20pm UTC](https://discuss.elastic.co/t/help-ive-hosed-my-cygwin-and-cant-run-es-anymore/40491/5 "2017-07-05T23:20:18Z")

</div>


