Last Updated: February 25, 2016
· mehikmat

Adding and Deleting user in Ubuntu

Add New User

$ sudo useradd user_name

Delete Existing User

$ sudo userdel user_name

$ sudo userdel -r user_name [to delete user's home dir too]

Logout loged in user

$ sudo pkill -KILL -u user_name

2 Responses
Add your response


Or just use adduser (http://manpages.ubuntu.com/manpages/trusty/en/man8/adduser.8.html) and deluser (http://manpages.ubuntu.com/manpages/trusty/en/man8/deluser.8.html).
They are friendlier front ends to the userdel and groupdel programs, removing the home directory as option or even all files on the system owned by the user to be removed, running a custom script, and other features.

over 1 year ago ·

Yes that's also.

over 1 year ago ·