I know that automorphism group of $\mathbb Z_q$ is $(q-1)$ because the group is cyclic and its generator's image determines the automorphism and we have exactly $(q-1)$ choices.
For $\mathbb Z_q \times\mathbb Z_q$ I was thinking that since the group is generated by $\{(0,1),(1,0)\}$ but couldn't think how to see the maps that would be automorphisms.