Normally, in bash, the answer would be ~/.bashrc or /etc/bash.bashrc. But unfortunately Ubuntu is sourcing these files from ~/.profile and /etc/profile respectively. So, where should I put such commands on Ubuntu?
See also Why is /etc/profile not invoked for non-login shells? if you are not familiar with these files.