Forrest logo
back to the useradd tool

useradd:tldr:3ff7a

useradd: Create a new user with the specified user id.
$ sudo useradd --uid ${id} ${username}
try on your machine

This command is used to create a new user account on a Unix or Linux-based operating system. Let's break down each part of the command:

  • sudo: This is a command that allows a user with administrative privileges to execute commands as the superuser or another user.

  • useradd: This is the command used to add a new user account.

  • --uid ${id}: The --uid option is used to specify the user ID (UID) for the new user account. The ${id} is a placeholder that should be replaced with the desired UID number. The UID is a unique numerical identifier assigned to each user account on the system.

  • ${username}: This is another placeholder that should be replaced with the desired username for the new user account. The username is a string of characters that represents the name of the user account.

When you run this command with the appropriate values for ${id} and ${username}, a new user account will be created with the specified UID and username.

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