Creating new users on Ubuntu is an essential task for managing a multi-user system. In this complete guide, you will learn how to create a new user on Ubuntu quickly and easily. This tutorial is perfect for beginners and system administrators who want to understand the process in detail.
Step 1: Open the Terminal
To start, open the terminal on your Ubuntu system. You can do this by pressing Ctrl + Alt + T
or searching for Terminal
in the applications menu.
Step 2: Command to Create a New User
Use the adduser command to create a new user
. Replace username with the name you want to assign to the new user
.
sudo adduser username
Example:
sudo adduser maria
The above command will create a user named maria
.
Step 3: Set Password
After executing the command, you will be prompted to set a password
for the new user. Enter and confirm the password when prompted.
Step 4: Optional Information
The adduser command will prompt you to provide some additional information, such as the user's full name
. These fields are optional and can be left blank by pressing Enter.
Step 5: Add Administrative Privileges (Optional)
If you want the new user to have administrative (sudo) privileges, add the user to the sudo group
.
sudo usermod -aG sudo username
Example:
sudo usermod -aG sudo maria
This will give maria
administrative permissions.
Step 6: Confirm User Creation
To confirm that the user was created successfully, you can list the users on the system using:
cut -d: -f1 /etc/passwd
This will display a list of all users
on the system.
Step 7: Switch to the New User
To switch to the new user, use the su
command and enter the new user's password.
su - username
Example:
su - maria
Conclusion
Creating new users on Ubuntu is a straightforward process that can be done in a few steps. Whether for administrative purposes or to add new team members, following this guide will ensure that you can efficiently manage users on your Ubuntu system.
Additional Tips
- Check Ubuntu Version: Before making system changes, it can be useful to know which version of Ubuntu you are using. Use the command
cat /etc/os-release
to check the version. - Security: Always use strong and secure passwords for all users, especially those with administrative privileges.
- Documentation: Keep documentation of all users and their permissions to facilitate system management.