I know there is an elaborate sequence of config files that BASH reads sequentially (or alternatively skipping if a particular one is present), however I have for the most part adopted ZSH as my default shell. I have tended to mainly edit my ~/.zshrc for everything but am wondering if I should be editing other files as well.
I install some programs in /opt/my-program/bin, I want to add /opt/my-program/bin to system $PATH for all users's non-login shell and login shell. What should I do?
Change /etc/environment is OK for non-login shell, but does not work for login shell because Debian's /etc/profile (which will be sourced by login shell) will override the $PATH specified in /etc/environment.