How To Remove An Ubuntu User

Table of contents:

How To Remove An Ubuntu User
How To Remove An Ubuntu User

Video: How To Remove An Ubuntu User

Video: How To Remove An Ubuntu User
Video: How to remove users in ubuntu , 100% working. 2024, May
Anonim

Ubuntu is a modern multi-user operating system based on the Linux kernel. It features easy installation and software updates, high security, and flexible user account management.

How to remove an ubuntu user
How to remove an ubuntu user

Necessary

A computer with an Ubuntu operating system, root or sudo rights

Instructions

Step 1

Ubuntu has a very handy utility for deleting a user from the command line - deluser. It is a command-line interface to the userdel utility specially tailored for operations in the command line. To run deluser you need superuser rights, which you can get by logging in as root or using the sudo command. To delete an Ubuntu user, run the command in a terminal: sudo deluser user_name Where user_name is the name of the user to be deleted. After executing the command, the regular user account will be deleted, and he will no longer be able to log on to the system. This will save his home directory and all the files that he owns.

Step 2

To remove an Ubuntu user along with their home directory and mailbox, add the --remove-home option after the deluser command. If you need to remove not only the home directory, but all user files in the system, use the --remove-all-files switch instead of the --remove-home option. With this switch, the deluser utility will find all files and directories owned by the deleted user and remove them, including the home directory.

Step 3

If you want to delete a user along with their home directory or all files, but want to keep them just in case, use the --backup option. With this switch, before deleting user files, they will be copied into a compressed tar archive, which will be created when deleting an account in the current directory. To specify a different location for the archive with user files, specify the required directory after the --backup-to switch.

Step 4

If you want to remove the root user, add the --force switch to the command. This key confirms that deleting the root user is not an error. You cannot delete the root user without --force.

Step 5

You can also delete a user in Ubuntu through the graphical interface. To do this, open the "Administration" menu in the "System" section of the start menu and select the "Users and groups" item. The User Account Control window will open on the screen. Select the user you want to delete in the left list and click on the "Delete" button. During the process of deleting a user, you can also choose to keep the user's files or delete along with the account.

Recommended: