.bashrc is not started automatically

This is a common misconception that users think .bashrc is called each time login shell is created etc. There is some truth behind this but need to look at this more closely. For now what i found out is that bashrc in the /etc folder is definitely called also ~/bash_profile  also plays a major role.  But not the .bashrc.

So all you have to do it seems create the ~/.bash_profile if it is not already there

add the following line to it.

if [ -f ~/.bashrc ]; then source ~/.bashrc ; fi

and thats it.


Tags: , ,

One Response to “.bashrc is not started automatically”

  1. Gobinath Says:

    Hi Saminda,

    i have called the . setEnvironmentVariables.sh in .bashrc file ,and i have also updated the following in the .bash_profile

    if [ -f ~/.bashrc ]; then
    . ~/.bashrc

    but it was not working.

    if i run the .bashrc file seperately it was working…

    pls guide me, thanks in advance.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

%d bloggers like this: