Specifically Ubuntu 16.04 but is there a general way it is set? The reason I ask is that I have several Ubuntu 16.04 installations (VMs on kvm/libvirt/qemu) where nothing specific was done to set this variable at installation and yet they have different values: linux, xterm, xterm-256color and there was one other I can't remember.
I have searched /etc and even opened up initrd in an effort to find where it is set to no avail.
I know it can be set in the user's environment (.profile or .bashrc) but I would prefer to set it globally rather than in numerous places. These systems have existing users so updating /etc/skel/bashrc is only a partial answer.