I frequently edited the
.bashrc file to export new environment variables.
Rather than close the console and start a new one to refresh the env variables, is there a convenient way to refresh?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Within the same window, you can simply type
bash to start a new one. This is equivalent to closing the window and re-opening a new one.
Alternatively, you can type
source ~/.bashrc to source the
In addition to what others have suggested, I have found out that
source won't unset the previously assigned environment variables. So, if you want to unset environment variables, you have to do it manually.