What command do you use to add a user in Linux?

Prepare for the Hands-On Server Test. Utilize real-world scenarios, flashcards, and expertly crafted multiple choice questions, complete with hints and explanations. Ace your exam with ease!

The command used to add a user in Linux is "useradd." This command is a standard utility that directly communicates with the system's user account database and performs the necessary actions to create a new user account. It can accept various options that allow you to define attributes such as the user’s home directory, shell, and user ID.

While "adduser" may also seem like a plausible option, it is often a script that acts as a friendly frontend to the "useradd" command, making it easier to use with prompts for user information. In many systems, "adduser" may not be available or could exhibit slightly different behaviors based on the distribution.

Other choices like "newuser" and "createuser" do not correspond to standard Linux commands for adding users. These options could lead to confusion, as they are not recognized commands in most distributions. Thus, "useradd" is the primary command for user creation in Linux, making it the correct choice.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy