Forrest logo
back to the useradd tool

useradd:tldr:90d53

useradd: Create a new user with the default home directory.
$ sudo useradd --create-home ${username}
try on your machine

The command sudo useradd --create-home ${username} is used to create a new user on a Unix-like system.

Here's the breakdown of each part of the command:

  • sudo: It is a command that allows a user to run programs or commands with the privileges of another user (usually the superuser or root) without logging in as that user.

  • useradd: This command creates a new user account on the system.

  • --create-home: This option instructs the useradd command to create a home directory for the user. The home directory is a location where the user can store personal files and configurations.

  • ${username}: It is a placeholder that indicates you should replace it with the actual username you want to create. For example, if you want to create a user named "john", you would replace ${username} with john.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the useradd tool