19

I'm trying to install TBB (Thread Building Blocks) from Intel onto my Mac. However, no matter where I look, I can't find the .profile file that I require to modify to use TBB.

Any advice or hints on where I could find it?

If it's hidden, how can I unhide it? (I'm new to OS X)

I have read some articles that say I could make my own .profile file but I don't think it's what I need to install the TBB.

slhck
  • 235,242

1 Answers1

28

There is no ~/.profile by default.

Some background: when you start your Terminal.app, it loads a shell – in your case Bash. Shells can have configuration files, and .profile is one of these. They are read when the shell starts up, in a specific order. You can run man bash and read the section "Invocation" for more details.

Now, under macOS, I would recommend to not create a .profile file, but a .bash_profile file instead. For Bash, this will make no difference in functionality. Note however that once you create a file called ~/.bash_profile, your ~/.profile will not be read anymore, and since most guides will want you to modify .bash_profile, it's better to stick to this one.

You can simply create the file if it doesn't exist and open it in a text editor.

touch ~/.bash_profile
open -e !$

Save it, and the next time you start a new instance of Bash (e.g. by opening a new Terminal window), your ~/.bash_profile will be read and all commands therein will be executed.

slhck
  • 235,242