Forrest logo
back to the useradd tool

useradd:tldr:6f755

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

The command 'sudo useradd --system ${username}' is used to create a system user with a specific username.

Here's a breakdown of the command and its components:

  • 'sudo' is a command that allows users to run programs or commands with the security privileges of another user, usually the superuser (or root). It asks for your password before executing the command.
  • 'useradd' is a command used to create a new user account.
  • '--system' is an option used with the 'useradd' command to create a system user. A system user is usually created for running services or processes on a system and typically doesn't have login privileges or a home directory.
  • '${username}' is a placeholder, which should be replaced with the desired username. This variable stores the username that you want to create as a system user.

When you execute this command with the desired username, it creates a system user with that 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