Console/SSH/X: How to tell?

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Tue Jun 23 20:36:46 UTC 2009


On Tue, Jun 23, 2009 at 04:21:14PM -0400, S P Arif Sahari Wibowo wrote:
> On Mon, 22 Jun 2009, Lennart Sorensen wrote:
>> Use the profile instead of bashrc.  bashrc is used for both  
>> interactive and non interactive sessions, while profile should only be 
>> interactive.
>
> I believe what make difference is not whether the shell interactive or 
> not, but whether the shell is a login shell or not. Furthermore it is not 
> that bashrc is run in both cases, just many distribution have the profile 
> to run bashrc.

According to 'man bash' interactive or not matters just as much.

.bash_profile also has different behaviour than .profile.  So use the
right filename for the job.

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list