0

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?

2

Just source the file by running . .bash_profile will do the job.

| improve this answer | |
  • Or, since this is bash, source .bash_profile – glenn jackman Oct 20 '18 at 15:45
  • @glennjackman source doesn't work, . works. – Aero Windwalker Oct 21 '18 at 13:20
  • that means your shell is not bash. At a bash interactive prompt, enter help . source and you might notice ... certain similarities. – glenn jackman Oct 21 '18 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.