Playing with VM's (Amazon Linux) and I figured I wanted to add an alias
la = "ls -al"
Sure, all good. But in the process, I noticed there were no aliases defined in my home directory (e.g. .bashrc
, et. al.) nor in /etc/bashrc
.
And yet, when I run alias
, I get a bunch of pre-existing aliases...
Where do they come from?
grep alias /etc/*/*
says /etc/profile.d contains shell scripts with alias definitions.
Run PS4=':${BASH_SOURCE}:${LINENO}+' bash -x -l -i
to log to stderr every command invoked during your shell's startup with the file name and line number where it came from. Searching this log should make the relevant location clear.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With