Can you explain this line for me please.
$ sudo usermod -G student,group1,group2 student
Hi @WarrenUK ,
From man usermod(8):
usermod - modify a user account
usermod [options] LOGIN
-G, --groups GROUP1[,GROUP2,...[,GROUPN]]]
A list of supplementary groups which the user is also a member of. Each group is separated from the next by a comma, with no intervening whitespace.
The groups are subject to the same restrictions as the group given with the -g option.
So, the command basically adds the user to groups in the system.
I hope that helps,