Thursday, January 30, 2025
HomeTechAddUser Command in Linux with Examples

AddUser Command in Linux with Examples

The adduser command in Linux is used to create a new user account. It is a more user-friendly alternative to the useradd command. Here’s an example:

bash
sudo adduser username

This command creates a new user username and prompts you to set a password and provide other details (such as full name). To create a user with a specific home directory or shell, you can use:

bash
sudo adduser --home /path/to/home --shell /bin/bash username

To assign the user to a group:

bash
sudo adduser username groupname

It simplifies the process compared to using useradd.

RELATED ARTICLES
0 0 votes
Article Rating

Leave a Reply

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
- Advertisment -

Most Popular

Recent Comments

0
Would love your thoughts, please comment.x
()
x