Linux Bash type and aliases

Something I learnt today about aliases in Linux Bash shell. I use plenty of aliases in bash. Sometimes I forget what a particular alias stands for. Apparently the which command doesn’t work for this purpose. As explained here: bash-aliases, you can certainly do alias <alias-name> to check what it does. However, this doesn’t work for any custom functions we define in bash. The command type works in all cases and is the best utility to use for this purpose.

type <alias/function> will list out the exact command in all cases.