GoDaddy 도움말

How to delete a user on Ubuntu

Ubuntu is a Linux operating system based on the Debian distribution. It currently defaults to the Unity desktop environment (DE), although previous versions of Ubuntu used the Gnome DE. Ubuntu primarily consists of open-source software that's distributed under the GNU General Public License at no charge. As with all other operating systems, maintaining user accounts is a routine task for Ubuntu system administrators. The essential steps for removing a user in Ubuntu include deleting the account and then deleting that user's home directory.
DIFFICULTY Basic - 1 | Medium - 2 | Advanced - 3
TIME REQUIRED 5 min
RELATED PRODUCTS Linux-based VPS or dedicated servers

Here is a quick tutorial on how to delete a user on Ubuntu.

Remove the user's account

Open a terminal window and enter the following command:

# sudo userdel testuser

The above line uses the userdel command to remove the account for testuser. The use of sudo ensures that this command has the required superuser privileges.

Delete the user's home directory

Enter the following command to delete the user's home directory:

# sudo rm -rf /home/testuser

This command removes the directory with the rm command. The r option removes the directory recursively, meaning that the subdirectories of /home/testuser are also removed. The f option forces the command, meaning that it will assume default responses without prompting you.

Verify the user account has been deleted

su testuser

You should receive an error saying this user does not exist


이 글이 도움되었나요?
피드백을 보내주셔서 감사합니다. 고객 서비스 담당자에게 문의하시려면 지원 전화 번호 또는 위의 채팅 옵션을 이용하시기 바랍니다.
도와드릴 수 있어 기쁩니다! 더 도와 드릴 것이 있나요?
그것 유감스럽습니다. 혼동이 되었던 사항 또는 솔루션이 고객님의 문제를 해결하지 못했던 원인을 알려주세요.