Ubuntu – Difference between adduser and usermod -G -a

addusercommand linegroupsuseradd

What is the difference between

adduser user_name group_name 


usermod -G -a user_name group_name 

At first glance they seems to do the same thing : add a user to a group.

Best Answer

adduser and usermod are two different utilities which have in common the fact that both can add a user to a group.

According to man adduser

adduser is friendlier front ends to the low level tools like useradd, groupadd and usermod programs.

More info:

  • man adduser : adduser, addgroup - add a user or group to the system
  • man usermod : usermod - modify a user account