How Add and Remove User in Linux?
Contents How Do You Add and Delete a User in Linux? You Can Create, Disable and Remove User Accounts Using Linux Admin Commands. You Can Add/Delete a User to a...
Contents
How do you add and delete a user in Linux?
You can create, disable and remove user accounts using Linux admin commands. You can add/delete a user to a usergroup.
…
Linux/Unix user management commands.
| Command | Description |
|---|---|
| sudo userdel -r ‘username’ | Delete a user |
| sudo usermod -a -G GROUPNAME USERNAME | Add user a to a usergroup |
Must Read
How do you add and delete a user in Unix?
Adding a new user
- $ adduser new_user_name. Otherwise, if you do not have root access you can use the command below.
- $ sudo adduser new_user_name. …
- $ groups new_user. …
- We will now add the created user to the sudo group. …
- $ usermod -aG group_name user_name. …
- $ sudo deluser newuser. …
- $ sudo deluser –remove-home newuser.