• Most COVID-19 rules have ended in New Zealand.
    • You must still isolate for 7 days if you have COVID-19.
    • You must wear a face mask in healthcare facilities, such as hospitals. International travellers will not need proof of COVID-19 vaccination.
    From 13 September 2022, to enter New Zealand, you do not need proof of vaccination.

How to delete user on RHEL 8 / CentOS 8 Linux

Andy

Administrator
Creative Team
User ID
1
Joined
7 Jan 2019
Messages
829
Reaction score
32
Points
28
Deleting user on RHEL 8 / CentOS 8 Linux system can be accomplished using the userdel command.

In this tutorial you will learn:
  • How to delete user on RHEL 8 / CentOS 8.
  • How to force user deletion.
  • How to delete the user as well as its home directory.
And here are the steps:
  1. Take a note of the user and its username you wish to remove.

    You can list all system users by using the below cat command:
    Bash:
    cat /etc/passwd

  2. Use the userdel command to remove a user. In this example, we will remove a user with username topimerah. Please note the -r option instructs the userdel command to remove also user's home directory:
    Bash:
    userdel -r topimerah

  3. Optionally, use the -f option to force the user removal in case the user is logged:
    Bash:
    userdel -f -r topimerah
If you have any questions, feel free to post them down below 👇
 
 Short URL:
Top