Re: [solved] Re: Setting up aliases to work also in tty* consoles?
On Tue, Jun 20, 2017 at 04:43:25PM +0100, Rodolfo Medina wrote:
> According to what you say, I solved my problem by putting my aliases in
> ~/.bash_profile rather than in ~/.bash_aliases. I don't know if it's correct,
> but it works.
It's not correct, because that file WON'T be read by regular shells.
It's only read by login shells.
Once more, from the top:
1) ~/.bash_profile should source ~/.bashrc
2) Shell functions and aliases and shopts and sets and other transient
settings should go in ~/.bashrc
3) Environment variables and other NON-transient settings should go in
~/.bash_profile
Substitute ~/.profile for ~/.bash_profile if necessary. This is the file
that is only read once.
Substitute ~/.bash_aliases for ~/.bashrc if necessary. This is the file
that is read by every new instance of the shell.
Reply to: