Bash – Refresh env variables after editing bashrc file

bashconsoleenvironment-variables

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?

Best Answer

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.

Related Question