The UNIX Forums
"Join the Network of UNIX System Users"


 
Subject: .bashrc file is an initialization file run by each interacti
CYBERAY
Newbie
Rank: 1



UID 102
Digest Posts 0
Credits 0
Posts 73
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 20, 2007 10:46 AM  Profile | P.M. 
.bashrc file is an initialization file run by each interacti



.bashrc file is an initialization file run by each interactive invocation




i search the web and found the following statements


.....
the /etc/profile file is a system wide initialization script which is run at login time for each user, while .profile is the users own login initialization. the .bashrc file is an initialization file run by each interactive invocation of the bash shell. my .bashrc simply sources the other two, so that all interactive shells get the same initialization. aliases common to all users rest in /etc/profile, others go into .profile.
..........


as my limited knowledge to linux/unix, i do not follow what is "interative invocation of the bash shell". could anyone please give me an example to this.


Top
CYBERAY
Newbie
Rank: 1



UID 102
Digest Posts 0
Credits 0
Posts 73
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 20, 2007 10:46 AM  Profile | P.M. 
/etc/profile and .profile (or indeed .bash_profile) are run when bash is called by the login process, this happens when you log on via a terminal or telnet or ssh or something similar.

.bashrc (and indeed /etc/bash.bashrc) are run when bash is called by any other method, for example if you logged on and then just type 'bash' or if you logged onto a graphical terminal and ran an xterm or if you ran a bash shell script from the command line.
Top
 

 

All times are GMT, the time now is Jul 31, 2010 03:36 AM

Powered by Discuz! 5.0.0  © 2001-2006 UNIX Forums
Processed in 0.004921 second(s), 8 queries

Clear Cookies - Contact Us - UNIX Help - Archiver - WAP