Difference between .bash_profile and .bashrc

.bash_profile and .bashrc are two bash shell config files. Where .bash_profile is a login shell config file, and .bashrc is a non-login shell file. By login-shell , we mean a shell file used during console login,  (ctrl+alt+F7)  ,which is .bash_profile file.

By non-login shell we mean shell used during terminal login (XTERM). Both config files are used to config bash shell to config the info written in it with login. .bashrc is also run when you start a new bash instance by typing /bin/bash in a terminal. both are present at home  i.e ~/.bashrc and ~/.bash_profile.

If you don’t have any above file you can create it yourself.

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s