Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Is it possible to change the location of .bashrc from /home/orhanc/.bashrc to some other directory?

share|improve this question
You can change /etc/.bashrc so that it will include the .bashrc in the special location (also different based on the users login/home directory). – Anthon Oct 29 '13 at 16:48

1 Answer 1

up vote 9 down vote accepted

Yes. You have three main options:

Symlink ~/.bashrc,

mv ~/.bashrc ~/blah && ln -s ~/blah/.bashrc ~/.bashrc

source the new file from ~/.bashrc,

mv ~/.bashrc ~/blah && cat > ~/.bashrc << 'EOF'
. ~/blah/.bashrc

or launch bash with --rcfile.

mv ~/.bashrc ~/blah
bash --rcfile ~/blah/.bashrc
share|improve this answer
Oh of course! If your couldn't tell, I'm still learning the ins and outs of using Linux and forgot about symlinks. Thank you! – OrhanC1 Oct 29 '13 at 16:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.