adduser -p password -d /home/john john Linux Commands – Overview with Examples and FAQs


The Linux command adduser -p password -d /home/john john is used to create a new user account with the username “john” and the password “password”. This command will create a new home directory for the user at the specified location, /home/john, and will set the user’s password to the specified password. This command is useful for creating new user accounts on a Linux system.


The command to add a user named “john” with a password of “password” and a home directory of “/home/john” is:

adduser -p password -d /home/john john

The adduser command is used to add a new user to a Linux system. It is typically used to create a new user account with a specific username and password. The command syntax is as follows:

adduser -p password -d /home/john john

The -p option is used to specify the password for the new user. The -d option is used to specify the home directory for the new user. In this example, the home directory is /home/john. The last argument is the username of the new user, which is john in this example.

Once the command is executed, the new user will be created and the user will be able to log in with the specified username and password.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

Jassweb, Rai Chak, Punjab, India. 143518