Make sourced .bash_profile works immediately in current window I use a macOS to connect to an Ubuntu server, after defining new .bash_profile (like upgrading node.js or making new alias), I will have to exit the ssh and login again after sourcing the .bash_profile before the updated bash to take effect is it possible to refresh the session in current terminal ssh session?
You can refresh the settings by running

. ~/.bash_profile


This will reread (source) the file. 

Also bash caches paths to binaries, so if you change the location of a binary already known to bash you need to run

hash -r


to remove those references.