How to use aliases defined in .bashrc in other scripts? August 14, 2023 by Tarik You need to do shopt -s expand_aliases in the script in addition to sourcing ~/.bashrc.