To add a new user in Ubuntu with a standard setup, you can follow these steps. You'll need to have administrative (sudo) privileges to perform these actions.
Using the Command Line
Open a Terminal:
You can do this by searching for "Terminal" in the activities overview or pressing Ctrl + Alt + T.
Add a New User:
Use the adduser command followed by the username you want to create. For example, if you want to create a user named newuser, you would enter:
bash
sudo adduser newuser
Set Password:
You will be prompted to set a password for the new user. Enter a strong password and confirm it.
Additional Information:
The command will also ask for some additional information such as the user's full name, room number, work phone, home phone, and other details. You can either fill these out or just press Enter to leave them blank.
Confirm Information:
At the end, you will be shown the information you entered. Type Y and press Enter to confirm.
Add User to Sudo Group (Optional):
If you want the new user to have sudo privileges (the ability to perform administrative tasks), you'll need to add them to the sudo group. You can do this with the following command:
bash
sudo usermod -aG sudo newuser
Switch to the New User:
You can switch to the new user account with:
bash
su - newuser
Using the GUI (if you're using a desktop version)
Open System Settings:
Click on the system menu in the top right corner and select "Settings."
Go to Users:
In the settings window, find and click on "Users."
Unlock to Make Changes:
Click on the "Unlock" button (you may need to enter your password).
Add a New User:
Click the "+" button to add a new user.
Fill in User Details:
Choose whether you want to create a Standard or Administrator account (the latter will grant sudo privileges).
Enter the username, full name, and pick a password.
Add User:
Once you’ve filled in the details, click “Add” to create the user account.
After following these steps, you should have successfully created a new user account in Ubuntu with a standard setup. If you've added the user to the sudo group, they will have administrative privileges; otherwise, they will have a standard user account.