.bash_aliases for all users (system wide) - eviltoast

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?

  • trymeout@lemmy.worldOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 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@lemmy.ca
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      1 year ago

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