# Mac Terminal Not Remembering Command

**URL:** <https://forum.freecodecamp.org/t/mac-terminal-not-remembering-command/88069>\
**Category:** General\
**Created:** [February 16, 2017, 5:58pm UTC](https://forum.freecodecamp.org/t/mac-terminal-not-remembering-command/88069 "2017-02-16T17:58:36Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![bernar83](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bernar83/32/101598_2.png) [@bernar83](https://forum.freecodecamp.org/u/bernar83)\
**Post date:** [February 16, 2017, 5:58pm UTC](https://forum.freecodecamp.org/t/mac-terminal-not-remembering-command/88069/1 "2017-02-16T17:58:36Z")

</div>

Hello Everyone,

I’m going through the git tutorial form udacity and I’m trying to launch Sublime 3 from my mac terminal. I have created the directory called .bash\_profile and added the line “export PATH=$PATH:/Applications/Sublime\ Text.app/Contents/SharedSupport/bin”. Afterwards I type in subl and it launches sublime from the terminal but when I close and open the terminal again it doesn’t remember the subl command. After entering subl, it just says subl command not found. Can anyone help me find out what’s wrong? Thanks!

---

<div class="post-metadata">

**Author:** ![PortableStick](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/portablestick/32/65591_2.png) [@PortableStick](https://forum.freecodecamp.org/u/PortableStick)\
**Post date:** [February 16, 2017, 7:01pm UTC](https://forum.freecodecamp.org/t/mac-terminal-not-remembering-command/88069/2 "2017-02-16T19:01:47Z")

</div>

> [@bernar83](#):
>
> I have created the directory called .bash\_profile and added the line “export PATH=$PATH:/Applications/Sublime\ Text.app/Contents/SharedSupport/bin”

I’m sure you meant you created a file instead of a directory, but I want to make sure you didn’t actually create a _directory_ called `.bash_profile`. It should be a file, with no extension, and it should be in your home directory. If you’d like to start fresh, try copying and pasting these commands

```auto
rm -rf ~/.bash_profile
touch ~/.bash_profile
echo "export PATH=\$PATH:/Applications/Sublime\ Text.app/Contents/SharedSupport/bin" >> ~/.bash_profile

```

---

<div class="post-metadata">

**Author:** ![bernar83](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bernar83/32/101598_2.png) [@bernar83](https://forum.freecodecamp.org/u/bernar83)\
**Post date:** [February 16, 2017, 10:27pm UTC](https://forum.freecodecamp.org/t/mac-terminal-not-remembering-command/88069/3 "2017-02-16T22:27:06Z")

</div>

Thanks for taking the time to reply! Do you happen to know the next steps to launch sublime from the terminal?

---

<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:** [February 16, 2017, 10:36pm UTC](https://forum.freecodecamp.org/t/mac-terminal-not-remembering-command/88069/4 "2017-02-16T22:36:20Z")

</div>

No need to touch it, btw.

---

<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:** [February 16, 2017, 10:37pm UTC](https://forum.freecodecamp.org/t/mac-terminal-not-remembering-command/88069/5 "2017-02-16T22:37:00Z")

</div>

It’s the same as before.

---

<div class="post-metadata">

**Author:** ![the-thief](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/the-thief/32/27876_2.png) [@the-thief](https://forum.freecodecamp.org/u/the-thief)\
**Post date:** [February 16, 2017, 10:42pm UTC](https://forum.freecodecamp.org/t/mac-terminal-not-remembering-command/88069/6 "2017-02-16T22:42:33Z")

</div>

Try this.

[https://help.github.com/articles/associating-text-editors-with-git/](https://help.github.com/articles/associating-text-editors-with-git/)

---

<div class="post-metadata">

**Author:** ![bernar83](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bernar83/32/101598_2.png) [@bernar83](https://forum.freecodecamp.org/u/bernar83)\
**Post date:** [February 16, 2017, 10:53pm UTC](https://forum.freecodecamp.org/t/mac-terminal-not-remembering-command/88069/7 "2017-02-16T22:53:03Z")

</div>

This helped a lot. Thanks.

---

<div class="post-metadata">

**Author:** ![mykeverest](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/mykeverest/32/160768_2.png) [@mykeverest](https://forum.freecodecamp.org/u/mykeverest)\
**Post date:** [January 21, 2018, 11:02pm UTC](https://forum.freecodecamp.org/t/mac-terminal-not-remembering-command/88069/8 "2018-01-21T23:02:07Z")

</div>

Hello there, pls how can I reset my terminal. The commands are not working. Helpppppp

---

<div class="post-metadata">

**Author:** ![PortableStick](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/portablestick/32/65591_2.png) [@PortableStick](https://forum.freecodecamp.org/u/PortableStick)\
**Post date:** [January 21, 2018, 11:23pm UTC](https://forum.freecodecamp.org/t/mac-terminal-not-remembering-command/88069/9 "2018-01-21T23:23:57Z")

</div>

What do you mean? What have you been doing? Which commands aren’t working? Which OS are you using? Which terminal emulator?

---

<div class="post-metadata">

**Author:** ![mykeverest](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/mykeverest/32/160768_2.png) [@mykeverest](https://forum.freecodecamp.org/u/mykeverest)\
**Post date:** [January 21, 2018, 11:57pm UTC](https://forum.freecodecamp.org/t/mac-terminal-not-remembering-command/88069/10 "2018-01-21T23:57:53Z")

</div>

Hi, I use macOS Sierra. Every command I type in returns not found. I know I have some how missed up with the bash profile. Is there a way I can fix this

---

<div class="post-metadata">

**Author:** ![PortableStick](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/portablestick/32/65591_2.png) [@PortableStick](https://forum.freecodecamp.org/u/PortableStick)\
**Post date:** [January 22, 2018, 12:22am UTC](https://forum.freecodecamp.org/t/mac-terminal-not-remembering-command/88069/11 "2018-01-22T00:22:11Z")

</div>

Try moving your bash profile to see if that fixes the problem.

```bash
mv ~/.bash_profile ~/.bash_profile.bak

```

Restart your terminal after running this.

---

<div class="post-metadata">

**Author:** ![GNORRA](https://avatars.discourse-cdn.com/v4/letter/g/7c8e57/32.png) [@GNORRA](https://forum.freecodecamp.org/u/GNORRA)\
**Post date:** [March 30, 2018, 11:39am UTC](https://forum.freecodecamp.org/t/mac-terminal-not-remembering-command/88069/12 "2018-03-30T11:39:01Z")

</div>

thanks , it’s work for me

---

<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, 2:47pm UTC](https://forum.freecodecamp.org/t/mac-terminal-not-remembering-command/88069/13 "2021-01-16T14:47:32Z")

</div>

Closed on January 16, 2021, 2:47pm UTC


