Forrest logo
back to the adduser tool

adduser:tldr:bb7e3

adduser: Create a new user with a home directory at the specified path.
$ adduser --home ${path-to-home} ${username}
try on your machine

The given command is used to create a new user in a Linux system with a specific home directory and username. Let's break it down:

  • adduser: This is the command that is used to add a new user to the system.
  • --home ${path-to-home}: This option specifies the path to the home directory for the new user. The ${path-to-home} placeholder needs to be replaced with the actual path.
  • ${username}: This is the username for the new user that will be created.

For example, if you want to create a user named "john" with the home directory "/home/john", the command would look like:

adduser --home /home/john john

This command would create a new user named "john" with the home directory "/home/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 adduser tool