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

Re: PATH revisited: one PATH to "rule the [Debian] World"



On Tue, Sep 26, 2023 at 03:37:44PM -0500, Tom Browder wrote:
> On Mon, Sep 25, 2023 at 10:03 Greg Wooledge <greg@wooledge.org> wrote:
> ...
> 
> Greg, one more file I don't think we've discussed: '~/.bash_aliases'.
> 
> How should I handle that in this variable login climate?

That's not a standard file.  Debian does not create it, and bash does
not read it.

It only gets read if you source it from some other file, like ~/.bashrc.
The /etc/skel/.bashrc provided by Debian will source it if it exists.

As far as management goes, since it's sourced by .bashrc it should be
treated like it's part of .bashrc.

If you're asking "Should I create it?  Should I put things in it, if I
find it?" I would say no to both.  If an individual user wants to use
it, that's their choice, but you shouldn't assume it exists, or that
it *should* exist, or that it will be read if it does exist.

But that's just me.

If you're asking "Should I modify .bashrc (or one of its sourced files)?"
that's a much more complicated question.  The normal reasons people put
environmental configuration into .bashrc are:

1) Because they only care about the environment in their terminals, not in
   their GUI apps.

2) Because they want the simplest choice, not the most efficient choice,
   and they don't care how often the environment configuration commands
   are re-executed.

3) Because they're using a desktop which overrides the X or Wayland
   session environment, and disabling that is either impossible, or too
   hard for them to discover.

4) Because they're using a desktop where the terminal environment is NOT
   inherited from the X or Wayland environment, so duplicating
   environment configuration commands in .bashrc is needed to get their
   effects in terminals.


Reply to: