Command to add group in linux/unix based os
Command
groupadd -g john
The above command will create group with name john
groupadd -g 7999 john
The above command will create group with name john and group id gid 7999
Command to add group in linux/unix based os
Command
groupadd -g john
The above command will create group with name john
groupadd -g 7999 john
The above command will create group with name john and group id gid 7999
To Add User in Linux,
useradd -g johngroup-s /bin/bash -m -d /home/john -u 199999 john
The above command will create user John which has a specific uid 199999, under group johngroup along with a home folder in /home/john and will also add an entry in ssh /bin/bash for the respective user.
Command Arguments