Same alike setting PATH variables in Windows, in some cases you will want to set paths in Mac too, so you can use certain functions from your terminal app (CLI). To do that you have to create a `.bash_profile` file and update it, as it won’t be created automatically from OS X for you.
Terminals where used in real life. 😉
Fire up Terminal, and then:
- Type “cd ~/” to go to your home folder
- If you have already created a .bash_profile file then to edit it in a text editor:
- If you haven’t created a .bash_profile file yet, then to create a .bash_profile file, in the terminal type:
- So now you have a .bash_profile and added new functionality. But yet the terminal you have opened may not noticed about it. So type “. .bash_profile” to reload .bash_profile and notify the terminal about the functions you newly added.
It’s that simple! 🙂