TestOut Linux Pro Practice Test 2025 – Complete Exam Prep Guide

Question: 1 / 400

What command is used to change a user's account name in Linux?

usermod -d

usermod -l

The command to change a user's account name in Linux is indeed `usermod -l`. The `-l` option specifically allows you to change the login name of an existing user account. When using this command, you specify the new username as an argument following the option, along with the current username of the account you want to modify.

For example, if you wanted to change the username from "oldname" to "newname", the command would look like this:

```

usermod -l newname oldname

```

This change can be important for various administrative tasks, such as updating user names to reflect organizational changes or correcting misspellings.

The other options serve different purposes:

- The `-d` option is used to change a user's home directory, which does not affect the username itself.

- The `-g` option is for changing a user's primary group, again unrelated to the account name.

- The `-c` option allows the administrator to update or change the user's comment field (often containing the user's full name or description), which also does not affect the username.

Understanding how these different options work enhances your capability to manage user accounts effectively in a Linux environment.

Get further explanation with Examzify DeepDiveBeta

usermod -g

usermod -c

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy