User accounts: Difference between revisions

Line 23: Line 23:
$ sudo adduser username groupname
$ sudo adduser username groupname
or
or
$ sudo useradd -a -G groupname username
$ sudo useradd -G groupname username  // for a new user
or
$ sudo usermod -a -G groupname username // for an existing user
</syntaxhighlight>
</syntaxhighlight>