help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help regarding making /etc/bash.bashrc as startup script


From: Greg Wooledge
Subject: Re: Help regarding making /etc/bash.bashrc as startup script
Date: Wed, 21 Sep 2022 07:09:49 -0400

On Wed, Sep 21, 2022 at 02:56:38AM -0400, Bhinderdeep kaur wrote:
> Hi,
> I’m looking for a way to make /etc/bash.bashrc as startup script for non
> logging shells.

It already is, or can be.

A given instance of the shell can either be LOGIN or NON-LOGIN.
It can also be INTERACTIVE or NON-INTERACTIVE.

When you open an xterm or equivalent, without the -ls option, you get
an INTERACTIVE, NON-LOGIN shell.

This kind of shell does NOT read /etc/profile or ~/.profile but it DOES
read ~/.bashrc and -- if your version of bash has been compiled with
this option -- the /etc/bash.bashrc or equivalent file on your OS.

So, the follow-up questions:

1) What operating system are you using?
1a) How do you login to it?  Console or GUI?  Ssh?  Do you use a desktop
    environment?  If so, which one?

2) How are you invoking bash?
2a) ps -fp $$ $PPID

3) What files IS bash reading currently?  (To the best of your knowledge.)

4) What are you trying to use /etc/bash.bashrc to achieve?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]