Is there a way to "resource" bash_profile without restarting the terminal?

I often have to make changes to my ~/.bash_profile , and I need to restart the terminal to propagate the changes. Is there any command I can run to redirect my ~/.bash_profile ?

+5
source share
1 answer

Yes, you can simply run:

 source ~/.bash_profile 

Or:

 . ~/.bash_profile 

This will reload / restart .bash_profile in the current shell.

I put this command in my ~/.bash_profile for convenience:

 alias reprofile='source ~/.bash_profile' 

Then I just type reprofile or repro TAB .

+5
source

All Articles