TestOut Linux Pro Practice Test 2025 - Free Linux Pro Practice Questions and Study Guide

Question: 1 / 400

What does the -M switch do with the useradd command?

Prevents the home directory from being created

The -M switch with the useradd command is utilized to prevent the automatic creation of a home directory for the new user. By default, when a new user is added using useradd, a home directory in the /home directory (or other specified location) is typically created to house the user's personal files and configuration settings. However, when the -M switch is included in the command, this default behavior is overridden, and no home directory will be created for the new user.

This switch is particularly useful in scenarios where a user does not require a home directory, such as in the case of system accounts or service accounts that only need to run specific processes without personal user configuration or data storage. It ensures that the user is created without the overhead of a home directory, allowing for a more streamlined setup in certain environments.

Get further explanation with Examzify DeepDiveBeta

Creates a default user profile

Assigns a user to supplementary groups

Changes the user's password

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy