nerdexam
Linux_Foundation

LFCS · Question #114

Which of the following commands can remove a user from a group?

The correct answer is E. usermod. The usermod command is used to modify a user's account attributes, including removing them from groups.

Submitted by hans_de· Apr 18, 2026User and Group Management

Question

Which of the following commands can remove a user from a group?

Options

  • Agrouprm
  • Bgroupmod
  • Cpasswd
  • Dusergroups
  • Eusermod

How the community answered

(34 responses)
  • A
    6% (2)
  • B
    3% (1)
  • D
    3% (1)
  • E
    88% (30)

Why each option

The `usermod` command is used to modify a user's account attributes, including removing them from groups.

Agrouprm

`grouprm` is not a standard Linux command; `groupdel` is used to delete a group, not remove a user from a group.

Bgroupmod

`groupmod` is used to modify a group's properties (like its name or GID), not to manage user memberships within it.

Cpasswd

`passwd` is exclusively used for changing a user's password and has no functionality for managing group memberships.

Dusergroups

`usergroups` is not a standard Linux command for user or group management.

EusermodCorrect

The `usermod` command allows administrators to modify various user account properties, including supplementary group memberships. By specifying a new list of supplementary groups using the `-G` option without `-a`, a user can effectively be removed from any groups not included in the new list.

Concept tested: User group management (`usermod`)

Source: https://man7.org/linux/man-pages/man8/usermod.8.html

Topics

#user management#group management#usermod command#Linux commands

Community Discussion

No community discussion yet for this question.

Full LFCS Practice