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.
/usr/local/binwithout altering environment variables. – jordanm Oct 8 '12 at 6:53cd $(basedir "$0"). Symlinks cause$0changes. – user955091 Oct 8 '12 at 7:02/usr/local/binor~/bin. – Gilles Oct 8 '12 at 22:56PATHin/etc/profile(at least for non-root users)? – Gilles Oct 8 '12 at 22:57