adduser's Examples

is used to add a new user to your current linux machine

$ adduser name

you can use new system uset usinng --system

adduser --system pavani

this commannd is used to create new user group

adduser --group group

we can use system and group commands to create systemgroup

adduser --system --group mygroup

we can create home directory in different location using --home command

adduser --home/directory/home_dir_name user

adduser creates a home directory while creating a user but by using no create home we can create user without creating home directory

adduser --no-create-home user

every user has a unique user id by usin -u we can create unique user ID for the the user

adduser -u userID user

we can create soecific group ID

adduser --gid group ID user

by using adduser we can add wxisting user to the existing group

adduser pavani mygroup

doesnot ask to set a password for a new user

adduser --disabled -login root

DevOpsSchool
Typically replies within an hour

DevOpsSchool
Hi there 👋

How can I help you?
×
Chat with Us