To add a new user in Linux, you can use the adduser command. Here’s how to do it:
-
Open a terminal.
-
Run the following command:
sudo adduser usernameReplace
usernamewith the desired username for the new user. -
Follow the prompts:
- You will be asked to enter a password for the new user.
- You may also be prompted to provide additional information such as the user's full name, room number, work phone, home phone, and other details. You can press Enter to skip any of these fields.
-
Confirm the information:
- After entering the details, you will be asked to confirm that the information is correct. Type
Yand press Enter to proceed.
- After entering the details, you will be asked to confirm that the information is correct. Type
The new user will be created, and a home directory will be set up for them at /home/username.
