0

I'm trying to follow the instructions here: http://www.ladysign-apps.com/developer/mac-osx-run-sublime-from-your-terminal/#.Vj0ZfYRqmj4.

Where is .bash_profile located?

I see a .bash_profile.swp in the root of my user folder. Is that the same?

When I open it, it looks like this:

b0VIM 7.3������„(TÈï    �ÇÎmyuser�����������������������������MacBook-Pro.local�����������������������~myuser/.bash_profile���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������utf-8
U3210����#"! U�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������tp��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ad��⁄��������������˚��˙��√��à��á��S������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source '/Users/myuser/google-cloud-sdk/completion.bash.inc'�# The next line enables bash completion for gcloud.��source '/Users/myuser/google-cloud-sdk/path.bash.inc'�# The next line updates PATH for the Google Cloud SDK.��quit�

Where exactly am I supposed to add the following in .bash_profile?

export PATH=~/bin:$PATH

-- UPDATE --

When I do nano ~/.bash_profile I see

# The next line updates PATH for the Google Cloud SDK.
source '/Users/myuser/google-cloud-sdk/path.bash.inc'

# The next line enables bash completion for gcloud.
source '/Users/myuser/google-cloud-sdk/completion.bash.inc'

Where in there should I add

export PATH=~/bin:$PATH
4thSpace
  • 119
  • 2
  • 6
  • Possible duplicate of [What are PATH and other environment variables, and how can I set or use them?](http://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them) – DavidPostill Nov 06 '15 at 21:55
  • @DavidPostill: I don't think so. – 4thSpace Nov 06 '15 at 21:58
  • Really? You clearly didn't read it properly. "user-specific values may be given to those variables in scripts located in the home folder (e.g., /etc/profile, $HOME/.bash_profile)" in the section labelled OSX. if `$HOME/.bash_profile` doesn't exist then create it. – DavidPostill Nov 06 '15 at 22:01
  • 1
    Real my question? Is that .bash_profile.swp? How do you edit it? I'd vote you down but I can't. – 4thSpace Nov 06 '15 at 22:20
  • No it's not. `bash_profile.swp` is some other file. You edit `~/.bash_profile` with your favourite editor. – DavidPostill Nov 06 '15 at 22:22
  • Why do you want to vote someone down who is trying to help you? – DavidPostill Nov 06 '15 at 22:23
  • It's the SO way. Plus, your responses aren't helping. – 4thSpace Nov 06 '15 at 22:24
  • Really? I've told you exactly what to do and where to find the information you need to know. You can add `export PATH=~/bin:$PATH` at the end of the file. – DavidPostill Nov 06 '15 at 22:26

1 Answers1

2

Where exactly am I supposed to add the following in .bash_profile?

export PATH=~/bin:$PATH
  1. Open ~/.bash_profile in your favourite editor.

  2. Add export PATH=~/bin:$PATH at the end of the file.

  3. Save the file.

  4. Start a new shell or terminal and PATH will have been updated to include the ~/bin directory.


Further Reading

DavidPostill
  • 153,128
  • 77
  • 353
  • 394