I set up some aliases in my .bash_profile on my Max OS X. It works but when I'm opening a new tab I always have to load my .bash_profile file with this command:
source ~/.bash_profile
How can I make it work for every terminal I'm opening, even if I'm restarting my Mac or Linux computer?
The . bash_profile is used for customizing the user configuration settings. This file is located in the home directory and is mostly hidden.
Go the users home directory. Check if the bash_profile is visible there or not. If not, press Command + Shift + . and bash_profile will be visible.
bashrc files or any files which has your environment variables or even other data which you want in them, for example you can have three .
If you use oh my zsh , you can add source ~/.bash_profile line at the end of .zshrc file at the following path: /Users/YOUR USER NAME/.zshrc , then restart your Terminal/iTerm2 app.
Note that this file is hidden. You can press CMD + SHIFT + . in Finder to see it, Or just open it in default text editor with the following command from terminal:
open ~/.zshrc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With