adduser command in Linux is used to add a new user to your current Linux machine. This command allows you to modify the configurations of the user which is to be created. It is similar to the useradd command in Linux. The adduser command is much interactive as compared to useradd command.
Installing adduser command
To install adduser tool use the following commands as per your Linux distribution.
In case of Debian/Ubuntu
$sudo apt-get install adduser
In case of CentOS/RedHat
$sudo yum install adduser
In case of Fedora OS
$sudo dnf install adduser
Working with adduser command
1. To add a new user
adduser username

This command will add a new user to your Linux system. It will ask for some details and after entering those details a new user account would be created.
2. To add a user with a different shell.
sudo adduser username --shell /bin/sh

This command will change the default shell for the new user to /bin/sh.
3. To add a new user with a different configuration file.
adduser username --conf custom_config.conf

This command will take the configurations from the custom_config file and will create the new as per custom_config filename configurations.
4. To add a user with different home directory.
adduser username --home /home/manav/

This command will add the new user with /home/manav as the default directory.
5. To get the version of the adduser command.
adduser --version

This command will print the version details of the adduser command.
6. To display the help section of the adduser command
adduser -h

This command will display the help section of the adduser command.
Recommended Posts:
- cp command in Linux with examples
- more command in Linux with Examples
- rev command in Linux with Examples
- apt-get command in Linux with Examples
- cmp Command in Linux with examples
- cut command in Linux with examples
- ip command in Linux with examples
- ln command in Linux with Examples
- ex command in Linux with examples
- at Command in Linux with Examples
- ar command in Linux with examples
- tee command in Linux with examples
- gs command in Linux with Examples
- df Command in Linux with examples
- which command in Linux with examples
- man command in Linux with Examples
- yes command in Linux with Examples
- tty command in Linux with examples
- id command in Linux with examples
- dc command in Linux with examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

