By default after installing Ubuntu Linux, the first account created during the installation is the primary user of the system. This user can run administrative tasks as root using the sudo command. By default, the root user account is disabled. No other user accounts are active. So to provide unique access to a user, you must create an account for him or her. A service can also have an account, in cases where it needs to perform account-related tasks. Also, for students and new users learning Linux, the easiest place to start learning is Ubuntu Linux. Ubuntu is the modern, open-source Linux operating system for desktops, servers, and other devices. In Ubuntu, there are two command-line tools that you can use to create a new user account: useradd and adduser. In Ubuntu Linux, the useradd tool is a low-level utility. adduser is a script that acts as a friendly interactive frontend for useradd.
How to add User from the command line
Adding a new user on Ubuntu from the command line is relatively quick and easy. To create a new user, simply invoke the adduser command followed by the username. For example, to create a new user account named octopus you would run the commands below: sudo adduser octopus When you run the commands above, you’ll be asked a series of questions about the detail of the account you’re creating. You’ll have to enter and confirm a password, but providing answers for the others is optional. If the information you entered is correct, type Y to create the account. With the account being created, if you want to make the account an administrator or allow the account to make changes to the machine, you’ll need to add the user to the sudo group. Run the commands below to do so. That’s how one creates a user on Ubuntu Linux via the command line terminal.
How to add a User on Ubuntu Desktop
If you are using a Ubuntu desktop, the steps above can be done using the desktop apps. First, log in to Ubuntu and follow the steps below: Click on the top System Menu and select Settings as shown in the image below. Then scroll down to Users on the item menu and select. Next, click Unlock at the top right to allow you to edit or create new user accounts. The Unlock button becomes Add Users. To add a new user, click Add Users and provide the user account details. Then provide the user’s Full Name as well as the username and password. When you’re done adding the account details, click Add as shown Above. If you want the account to be a member of the administrator group, click the Administrator tab to add the user to the group.
How to delete a user on Ubuntu Linux
In Ubuntu, you can use two commands to delete a user account: userdel and its friendly interactive frontend tool: deluser. To delete the example user created above, run the commands below: The command above will delete the user but not his/her files. To delete the user and files, run the commands below. Using an Ubuntu desktop, the same can be performed from the User settings window above. Select the user account and click Remove. That should do it! Conclusion: This post showed you how to add or remove a user on Ubuntu Linux. If you find any error above or have something to add, please use the comment form below.