Linux is widely used in the IT industry, including embedded systems, robotics, and networking. Compared to its rivals, Linux has established itself as a superior platform. In addition, advancements in the graphical user interface (GUI) have made Linux distributions more prevalent in people’s daily lives.

  1. Log in to your Ubuntu account and open a terminal window.
  2. Type the following command to create a new user: sudo useradd -m -G ubuntu ubuntu-user
  3. Type the following command to add an existing user: sudo usermod -aG ubuntu ubuntu-user

Steps to create User in Ubuntu 22.04 or 20.04 using GUI or Terminal

Acess Terminal

Step 2: Create a new user by typing the following command in the Terminal app on GUI Linux: sudo adduser -s mynewuser Step 3: Type the following command to create a new empty directory for your new user: mkdir -p /home/mynewuser

Add a new user on Ubuntu 22.04

Step 2: In the terminal, type the adduser command and provide the user’s name. The user will be added to your system and be able to access all of your files and applications.

Step 2: The system will prompt you to input your user password as you run the command in order to complete it. Type the password you want to use to secure your newly formed user after that.

If you want to set the user’s password, you first need to provide some more information, such as the Full name of the user, phone number, and other important details. If you enter these values into the password field, then the system will ask if you’re sure they’re correct. If you hit the Enter key a few times until you get the “Is the information correct?” question, then your new user is created.

Check user added successfully or not

/usr/bin/useradd -m -g user1 -d /home/user1 Step 2: After the user has been created, use the given command to log in: useradd -m -g user1 -d /home/user1 -s /bin/false

Step 2: Replace the user with the one you have created in the above command.

List all users on Ubuntu 22.04 or 20.04

SELECT COUNT(*) FROM users; Step 2: To list all available files, we can use: SELECT filename FROM files; ..

To make sure that your computer is safe from malware and other malicious software, follow these simple steps:

  1. Make sure you have up-to-date antivirus software installed and running.
  2. Always use a strong password and never share your login information with anyone.
  3. Keep your computer clean by regularly deleting old files and installing new security updates. ..

Assign Sudo to a user

Step 2: To give sudo rights to your newly created user, add the following line to your /etc/sudoers file: sudoers -a Step 3: To execute the command with sudo rights, add the following line to your /usr/bin/sudoers file: sudo -R myuser mycommand

Remove sudo rights

sudo -R Step 2: After you revoke or remove sudo access, you will need to re-login to the system in order to continue using it. To do so, use the following command: sudo login

Change user name

Step 2: The password can be easily changed using Step 3: The email address can be easily changed using Step 4: The website can be easily changed using The username, password, email address, and website can all be easily changed on the account’s settings page. ..

If you are the user name to be changed, please inactive your account.

Delete a user from Ubuntu 22.04

sudo apt-get remove -f user Step 2: If you do not require a user on your Ubuntu Linux system, then you can create one by using the following command: sudo adduser user

Add a User account using Ubuntu 22.04 GUI

Step 2:Click on the account type you want to create a new one for. The default is a Standard account, which should be enough for most use cases, especially if you need a limited account to test. If further authorizations as an admin or sudo are required later, you can also change the role later from Standard to Administrator. Step 3:Enter your name and email address. These are important for future support and should be kept confidential. You will not be able to use this account again until you have updated your information and password.

Step 3: The user’s password is set. This is a simple, easily remembered string that you will need to remember when logging in. There are no spaces in this. Step 4: The user’s email address is set. This is the address that you will use to contact you when needed. There are no spaces in this.

To help users choose strong passwords, you can let them choose their own password when they first log in. You can also set a new password for the new user yourself. ..

The strength of the password will evaluate by the system using colored bars. If you prefer to have a random password generated, click on the small icon at the end of the password field.

After you have set all the options, click on the Add button at the top right of the dialog. Provide your system password to execute the task. You will then be taken back to the main window. There you have another opportunity to check the settings for the new user account and, if necessary, to make corrections.

Final Words

Ubuntu Linux users can create new users with varied rights, such as one with sudo and another without, just like on Windows. This enables numerous users to collaborate on the same system while maintaining exclusive access to individual files and directories. The standard/regular user account cannot access any other system/user account’s files, but the root or Super Admin user may. ..