Quantcast
Channel: How to reload .bash_profile from the command line - Stack Overflow
Viewing all articles
Browse latest Browse all 16

Answer by Ulukai for How to reload .bash_profile from the command line

$
0
0

If you don't mind losing the history of your current shell terminal, you could also do

bash -l

That would fork your shell and open up another child process of bash. The -l parameter tells Bash to run as a login shell. This is required, because .bash_profile will not run as a non-login shell. For more information about this, read here.

If you want to completely replace the current shell, you can also do:

exec bash -l

The above will not fork your current shell, but replace it completely, so when you type exit it will completely terminate, rather than dropping you to the previous shell.


Viewing all articles
Browse latest Browse all 16

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>