Situatie
Solutie
The command to use depends on which distribution of Linux you’re using. For Debian based Linux distributions, the command is deluser
, and for the rest of the Linux world, it is userdel
.
Actually, on Ubuntu both commands are available. I half-expected one to be an alias of the other, but they are distinct binaries.
commands: type deluser type userdel
Although they’re both available, the recommendation is to use deluser
on Debian-derived distributions:
“userdel
is a low level utility for removing users. On Debian, administrators should usually use deluser
(8) instead.”
That’s clear enough, so the command to use on this Ubuntu computer is deluser
. Because we also want their home directory to be removed we’re using the --remove-home
flag:
command: sudo deluser –remove-home “name”
The command to use for non-Debian distributions is userdel
, with the --remove
flag:sudo userdel –remove “name”
All traces of user account eric
have been erased. We can check that the /home/"name"/
directory has been removed with: ls /home
Leave A Comment?