One can create a file named .bash_aliases
in their home directory to create aliases for that user.
Is there a way to create a .bash_aliases
that is system wide for all users? I know one can add aliases in the /etc/bash.bashrc
file but this is not ideal.
And is there a way to achieve this with other shells such as zsh and fish?
Did you make sure it is a bash script, starting with a shebang, and is executable.