Which command is used to create a new user account in Linux?

Prepare for the LPI 101-500 Certification Exam. Utilize flashcards, navigate multiple choice questions, and benefit from hints and explanations. Begin your Linux certification journey today!

The command used to create a new user account in Linux is useradd. This command is a standard utility in most Linux distributions and is used to add user accounts from the command line.

When you execute useradd, it modifies system files appropriately to create a new user, assigns default values to various user attributes such as home directory, shell, and user ID (UID), unless you specify otherwise. This command is typically used by system administrators to manage user accounts.

While adduser may also be a command present in many distributions, it is often a frontend script that utilizes useradd behind the scenes and may provide a more user-friendly interface. Options like createuser and newuser do not exist as standard command-line utilities for user creation in Linux. It's essential to understand that the core command is useradd; knowing this can assist you in effectively managing user accounts in a Linux environment.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy