Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Bash Profile vs Bashrc





The simple rule of thumb here is,

".bash_profile is executed for login shells,
.bashrc is executed for non-login shells"



Login Shells
As the name says, when you use a login, a username & password through a console, it is a login shell. This also applicable if you are login remotely via SSH. So if you need to see the things happening only in login shell, just add the settings only to the .bash_profile.

Non-Login Shells
After a login, you may need to open a new terminal and that is a non-login shell as it is just a terminal that you want to work on.Adding  the settings to .bashrc would do the thing when get a non-login shell.



This post first appeared on Devdummy, please read the originial post: here

Share the post

Bash Profile vs Bashrc

×

Subscribe to Devdummy

Get updates delivered right to your inbox!

Thank you for your subscription

×