Which command is used to add a user in a Linux system?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The command used to add a user in a Linux system is 'useradd.' This command is a standard utility that is included with many Linux distributions and directly interacts with the system's user database. When executed, it creates a new user account and sets up the necessary files and settings needed for that account.

It is important to note that 'useradd' provides a more granular level of control compared to some other commands. It allows administrators to specify various parameters, such as the user's home directory, shell, and user ID. Additionally, 'useradd' typically requires superuser (root) privileges, ensuring that effectively managing user accounts is a task reserved for authorized personnel.

Other options do not correspond to valid commands used for adding users in Linux systems. For instance, 'adduser' might be available in some distributions as a more user-friendly wrapper around 'useradd,' but it is not universally standard and might behave differently depending on the system. Commands like 'createuser' and 'newuser' do not exist in standard Linux distributions, which is why they are not suitable choices for adding a user.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy