How to update a bash shell with new bashrc file

If you have made some changes to your bashrc file, how do you update your current bash shell without exiting it?

One solution is to ask bash to read and execute your bashrc file, thus updating itself from the changed commands and settings in it. This can be done using the source built-in command of bash.

For example, to update my current shell with my changed .bashrc:

$ source ~/.bashrc

Tried with: bash 4.2.24 and Ubuntu 12.04.1 LTS

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.