How to Create a user in Debian Linux using adduser Command
In this tutorial we are going to learn how to add users in Debian Linux using Command Line Interface.
Debian Linux uses adduser command to create users from the command line. Use adduser command followed by the username to create a new user with the default options.
Once you run the adduser command, you will be prompted to setup the password for the new user.
- Default User information is defined in /etc/adduser.conf file.
- Home Directory for the new user will be created inside the /home directory.
- By default corresponding group with the same name will be created for the new user.
- An Entry will be added to the /etc/passwd file containing user information.
Example : Add new user in Debian using adduser Command
Add new user to the Debian System called admin. Home Directory of the admin user will be /home/admin.
Create user with custom Home Directory
By default, user home directory will be created inside the /home directory, But with command option --home we can specify different location for the home folder.
adduser --home /var/admin admin
New user called admin will be added to the debian Linux system with /var/admin as the new home directory.
Which Linux Command uses to add new user in Debian Linux ?
The Debian adduser command uses to add new users in Debian Linux.
What is the Command options use to define custom Home directory?
The command option --home use to create user home directory in a given location.