Refresh env variables after editing bashrc file
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 .bashrc
file.
Just use
source ~/.bashrc
or
. ~/.bashrc
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 using unset <var>
.