Here is where I find grep -rl
very useful:
This command
grep -rl alias ~/.bash* ~/.profile /etc/profile /etc/bash.bashrc
will tell you in which file the word alias
is used.
ProbablyIt is probably in ~/.bashrc
and most certainly in ~/.bash_aliases
if it exists.
It is, however, impossible to be absolutely sure that that this search covers all options.
Those files may also call or load any other files anywhere else in the filesystem.
An environment variable like ENV or $BASH_ENV
may direct bash to load some other files.
looks for the variable BASH_ENV in the environment, expands its value if it appears there, and uses the expanded value as the name of a file to read and execute.
And aliases may even be defined by setting a variable (emphasis mine):
BASH_ALIASES
An associative array variable whose members correspond to the internal list of aliases as maintained by the alias builtin. Elements added to this array appear in the alias list