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?

  • @trymeoutOP
    link
    English
    11 year ago

    I put a myaliases.sh file in /etc/profile.d/ with all of my aliases and they do not show up in the terminal even after I rebooted my computer.

    • bzLem0n
      link
      fedilink
      01 year ago

      Did you make sure it is a bash script, starting with a shebang, and is executable.