tags:

views:

324

answers:

3

Hello StackOverflowers,

If I make changes to .bashrc, how do I reload it without logging out and back in?

I'm embarrassed that I don't know the answer to this question, since I do a fair amount of bash scripting. I'm also couldn't decide if I should post this on ServerFault, but since I do more scripting than sysadmin, I chose StackOverflow; go ahead and move it if you (the community) feel that SF would have been a better choice.

Thanks in advance. I'm sure once I hear the answer I'll be saying "doh! I knew that.", but it'll probably be good to have the answer here for other folks like me that should know (or do), but can't remember (I did search before asking, and couldn't find the answer, sorry if this is a repost).

--jed

+4  A: 

. .bashrc

...

Randy Proctor
This will only work if your current directory is actually your home directory. The following will work:. ~/.bashrc
Brian Showalter
What makes this work? What is actually happening when I do ". .bashrc"? Thanks!
Jed Daniels
. is a BASH shortcut for the "source" builtin command. So ". .bashrc" is the same as "source .bashrc" to the BASH interpreter.
Brian Showalter
Cool. Thanks. Now that I didn't know.
Jed Daniels
+1  A: 

type:

source .bashrc
jwismar
+9  A: 

You just have to enter the command:

source ~/.bashrc

George Hawkins
+1 for absolute path to bashrc
N 1.1
I knew it: "DOH! I knew that." Thanks much, sorry for such a basic question.
Jed Daniels