Add new user in Ubuntu Linux using Terminal Command

If you want to add a new user in Ubuntu Linux, you can make use of the create newuser command,

root@ubuntu:/# adduser newuser

Adding user `newuser' ...

Adding new group `newuser' (1001) ...

Adding new user `newuser' (1001) with group `newuser' ...

Creating home directory `/home/newuser' ...

Copying files from `/etc/skel' ...

New password: 

Retype new password: 

passwd: password updated successfully

Changing the user information for newuser

Enter the new value, or press ENTER for the default
	Full Name []: John
	Room Number []: 2022
	Work Phone []: 000
	Home Phone []: 000
	Other []: 

Is the information correct? [Y/n] Y

To move to the newly created user simply do su newuser

❗️Make sure you are either using a root user or sudo along with this command or else you will get an error - adduser: Only root may add a user or group to the system.

Recent Posts:

Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.