# \-bash command not found

**URL:** <https://forum.freecodecamp.org/t/bash-command-not-found/113860>\
**Category:** General\
**Created:** [May 9, 2017, 5:15pm UTC](https://forum.freecodecamp.org/t/bash-command-not-found/113860 "2017-05-09T17:15:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tishpr](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/tishpr/32/159210_2.png) [@tishpr](https://forum.freecodecamp.org/u/tishpr)\
**Post date:** [May 9, 2017, 5:15pm UTC](https://forum.freecodecamp.org/t/bash-command-not-found/113860/1 "2017-05-09T17:15:41Z")

</div>

I tried entering commands in iTerm 3, which previously worked just fine. Now when I tried  
$ puts “blah blah blah"  
it returns:  
” -bash command not found"  
Other commands behave the same…  
what is wrong here?

---

<div class="post-metadata">

**Author:** ![portugabhz](https://avatars.discourse-cdn.com/v4/letter/p/fbc32d/32.png) [@portugabhz](https://forum.freecodecamp.org/u/portugabhz)\
**Post date:** [May 9, 2017, 5:56pm UTC](https://forum.freecodecamp.org/t/bash-command-not-found/113860/2 "2017-05-09T17:56:10Z")

</div>

> [@tishpr](#):
>
> " -bash command not found"

Hi,

You can set your path this way:

export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin  
and you can always add other directories if you want. Hope this helps.

---

<div class="post-metadata">

**Author:** ![tishpr](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/tishpr/32/159210_2.png) [@tishpr](https://forum.freecodecamp.org/u/tishpr)\
**Post date:** [May 9, 2017, 5:59pm UTC](https://forum.freecodecamp.org/t/bash-command-not-found/113860/3 "2017-05-09T17:59:17Z")

</div>

thanks for answering me… I have been trying to understand this for a couple of years… and it just doesnt sink in…  
I was doing work on terminal… and using $puts "sllsdlfjlsfllflj"  
it says command not found…here is what $PATH returns…

```auto
-bash: /usr/local/git/bin:
/opt/sm/bin:
/opt/sm/pkg/active/bin:
/opt/sm/pkg/active/sbin:
/Users/Tish/.rvm/gems/ruby-2.2.6/bin:
/Users/Tish/.rvm/gems/ruby-2.2.6@global/bin:
/Users/Tish/.rvm/rubies/ruby-2.2.6/bin:/
usr/bin:
/bin:
/usr/sbin:
/sbin:
/usr/local/bin:
/usr/local/git/bin:
/usr/local/rvm/gems/ruby-2.3.1/bin:
/Users/Tish/.rvm/bin:
/Applications/Postgres.app/Contents/Versions/latest/bin:
/Users/Tish/.rvm/bin:
/Applications/Postgres.app/Contents/Versions/latest/bin:
/usr/local/mysql/bin: 
No such file or directory

```

---

<div class="post-metadata">

**Author:** ![lynxlynxlynx](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lynxlynxlynx/32/2597_2.png) [@lynxlynxlynx](https://forum.freecodecamp.org/u/lynxlynxlynx)\
**Post date:** [May 9, 2017, 7:30pm UTC](https://forum.freecodecamp.org/t/bash-command-not-found/113860/4 "2017-05-09T19:30:37Z")

</div>

Isn’t puts a ruby keyword? You have to run ruby first for that.

---

<div class="post-metadata">

**Author:** ![tishpr](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/tishpr/32/159210_2.png) [@tishpr](https://forum.freecodecamp.org/u/tishpr)\
**Post date:** [May 9, 2017, 7:43pm UTC](https://forum.freecodecamp.org/t/bash-command-not-found/113860/5 "2017-05-09T19:43:56Z")

</div>

eh… it may be, but I wasn’t doing any ruby… I was just following a tut, and it was creating a directory, then asking you to make a file… I’ve been messing around in the terminal, I thought maybe I screwed something up…

---

<div class="post-metadata">

**Author:** ![lynxlynxlynx](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lynxlynxlynx/32/2597_2.png) [@lynxlynxlynx](https://forum.freecodecamp.org/u/lynxlynxlynx)\
**Post date:** [May 10, 2017, 10:05am UTC](https://forum.freecodecamp.org/t/bash-command-not-found/113860/6 "2017-05-10T10:05:19Z")

</div>

You did, puts is not a command that is available by default (not a sh-ell builtin), neither it is common — I haven’t heard of it. So no wonder the system can’t find the application. So check that tutorial for what type of terminal/shell it is.

I think you are trying to emulate “echo”.

---

<div class="post-metadata">

**Author:** ![waqarHocain](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/waqarhocain/32/122653_2.png) [@waqarHocain](https://forum.freecodecamp.org/u/waqarHocain)\
**Post date:** [May 10, 2017, 11:05am UTC](https://forum.freecodecamp.org/t/bash-command-not-found/113860/7 "2017-05-10T11:05:54Z")

</div>

`puts` is a ruby method so it won’t work in shell, unless you run ruby interpreter. You can use `echo` to print something back in shell, or redirect its output to a file(`echo "some random junk" > file.txt`).

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 16, 2021, 5:59pm UTC](https://forum.freecodecamp.org/t/bash-command-not-found/113860/8 "2021-01-16T17:59:46Z")

</div>

Closed on January 16, 2021, 5:59pm UTC


