Re: Strange Problem with 'alias'
On Tue, Nov 08, 2016 at 02:08:02PM -0600, Michael Milliman wrote:
> On Tue, 2016-11-08 at 15:04 -0500, Greg Wooledge wrote:
> > On Tue, Nov 08, 2016 at 02:37:34PM -0500, Henning wrote:
> > > Put your aliases into .bash_ptofile
> >
> > No, don't do that. Make your login shell profile source or dot in
> > ~/.bashrc instead.
> >
> Ok, now I have to ask the queston, maybe a tangent and maybe not
> important to OP, but why is it better to source in .bashrc from .profile
> rather than putting the commands in .bash_profile??
When you run a non-login shell, it reads ~/.bashrc only. So the aliases
have to be there, or they won't be read at all.
Putting a second copy of your aliases in ~/.bash_profile means you have
to keep both copies in sync. It's silly and error-prone and wasteful
of disk space.
Reply to: