How to create a .bash_profile on MAC OS X?

Creating a .bash_profile on MAC OS?


A typical install of OS X won't create a .bash_profile for you. When you want to run functions from your command line, this is a must-have.

1. Start up Terminal (Spotlight search Terminal)
2. Type "cd  ~/" to go to your home folder
3. Type "touch .bash_profile" to create your new file.
4. Edit .bash_profile with your favorite editor (or you can just type "open -e .bash_profile" to open it in TextEdit.
5. Type ". .bash_profile" to reload .bash_profile and update any functions you add.
6. Save the file
7. Launch Terminal and open nano ~/.bash_profile
Open_Bash_Profile_Terminal

8. Click Ctrl+X and switch to .bash_profile
9. Export the environment variable to wish say EXPORT ENV_VAR=.....
10. Save them by CTRL+O, close with CTRL+X
Setting_Environment_Variable_Bash_Profile

11. Open new Terminal tab and observe the environment variables by observing the value type $<ENV_VAR>

No comments:

Post a Comment

How to handle categorical features with spark-ml?

How to Handle Categorical Features with Spark ML Categorical features are a type of feature that can take on a limited number of values, suc...