useradd
The following command will add a user with name testuser. It will be added to sudo and root group. By default, its home folder will be created and its login shell is bash.
1 | useradd -G sudo,root -m -s /bin/bash testuser |
userdel
Files in testuser’s home directory will be removed with the home directory itself and its mail spool.
1 | userdel -r testuser |
1 | awk -F="xx" '{print "xxxx " $1 "-" $2}' |