As I suggested in my short comment, this kind of question has been around for a long time and has led to a vast amount of literature. It probably starts with work over fields by Schreier and van der Waerden in the 1920s, then considerable work by Dieudonne, O'Meara, and many others. Two indications about what's out there are a survey by O'Meara *The integral classical groups and their automorphisms* (1969) and a short paper by me dealing from the algebraic group viewpoint with groups like $SL_n(\mathbb{Q})$, *On the automorphisms of infinite Chevalley groups*, Canad. J. Math. 21 1969 908–911, the latter probably available online by now. These are listed on MathSciNet, but I couldn't display the links there for some reason. I'll try to suggest more focused literature on your question when I get time today.