0

I'm trying to add a variable to my path in my OSX Mavericks using ~/.bash_profile, but when I type it, I get this error:

-bash: /Users/MyUser/.bash_profile: No such file or directory

I've read somewhere that in Mavericks it's done in a different way.

Anyone knows how to do this?

1 Answer 1

2

I am using ._bash_profile and .bashrc on Maverick, this work well. If it does not exist, you can create and edit it using, vim, emacs or any editor.

$ touch ~/.bash_profile

$ open ~/.bash_profile -a "TextEdit"

This is my .bash_profile, the second line (export PATH) is what you are looking for.

# Set architecture flags
export ARCHFLAGS="-arch x86_64"
# Ensure user-installed binaries take precedence
export PATH=/usr/local/bin:$PATH
# Load .bashrc if it exists
test -f ~/.bashrc && source ~/.bashrc
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.