where is the "module" a command coming from - aka why it doesn't show up in alias?

Edit: I wonder if something tricky is being done in the alias. Try this:

alias|hd

Edit 2:

The reason I suggested the above is that it's possible to hide aliases. See my question and answer here for details.


Original answer:

Try type -a module it's more comprehensive.

Also, if it's a function, you can see its definition using this:

declare -f module

and you would need to grep these files, plus any that they source, plus any that I left out, to find where it's defined:

  • /etc/profile
  • /etc/bash.bashrc
  • ~/.profile
  • ~/.bashrc
  • ~/.bash_profile
  • ~/.bash_login