help-bash
[Top][All Lists]
Advanced

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

Re: question about .bash_profile


From: alex xmb sw ratchev
Subject: Re: question about .bash_profile
Date: Thu, 1 Feb 2024 14:08:43 +0100

On Thu, Feb 1, 2024, 13:22 Greg Wooledge <greg@wooledge.org> wrote:

> On Thu, Feb 01, 2024 at 11:39:27AM +0000, Kerin Millar wrote:
> > On Thu, 1 Feb 2024, at 11:09 AM, alex xmb sw ratchev wrote:
> > > is it as equivalent as .profile ?
> >
> > Please refer to INVOCATION in the manual. Bash looks for
> ~/.bash_profile, ~/.bash_login and ~/.profile in that order, reading and
> executing commands from the first of those three files that it finds. So,
> if you want for bash to recognise ~/.profile, you have to ensure that
> ~/.bash_profile does not exist.
>
> Or source ~/.profile from ~/.bash_profile.  This is something that one
> might do if one sometimes switches login shells, or shares this home
> directory across multiple machines, some of which have different login
> shells.
>

i dont look much into non bash , .. i d understand the logic .. but chats
dont look as good as they ve been in y2002 .. so cant

anyhow i have this simple setup

out=xmbashuserin
then move existing files away
print ' exec sudo -i -- "$@" \n ' into $out
and ln -s it to .bashrc and .bash_profile

this is for setting up wsl debian for my personal usage ..
1 make current user sudo nopasswd by printf simple to sudoers.d/$USER
2 replace bash inits with the own
3 run a thing that updates my sources.list
4 use another thing to upgrade or install uninstall search etc

all four all scripts
thank to goodness for coding languages

i gotta report here , i had some similiar setup somewhen , where i
symlinked those files , and somewhen later bash malfucted on some wrong
files , those .. eg ' some ln -s ed bashrc / profile made it malfunct '
.. half distant memories

greets

The idea, in this case, would be to put all of the shell-portable stuff
> in ~/.profile, and to put each shell's specific stuff in its unique
> startup file, which sources or dots in ~/.profile at some point.
>
> Of course, there are lots of ways to set things up, so one should choose
> whatever is most appropriate for one's needs.
>
>


reply via email to

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