Mac Terminal Not Remembering Command

Mac Terminal Not Remembering Command
0.0 0

#1

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!


#2

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

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

#3

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


#4

No need to touch it, btw.


#5

It’s the same as before.


#6

Try this.

https://help.github.com/articles/associating-text-editors-with-git/


#7

This helped a lot. Thanks.


#8

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


#9

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


#10

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


#11

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

mv ~/.bash_profile ~/.bash_profile.bak

Restart your terminal after running this.


#12

thanks , it’s work for me