When to use adduser or useradd
Solution 1
There is no difference in the functions provided, just that
useradd
is a compiled binary, andadduser
is a perl script.adduser
is more user-friendly, so it could fit better for a beginner.Use
adduser
create a fully functional user on the system. The command will run tasks like creating home directory, creating a group for it, promting for password, etc. Beside thatuseradd
will just create the user (ofcourse you can use switches, but the default is just the user creation).The two commands are not identical (
adduser
runsuseradd
and many other things).
Solution 2
useradd is native binary compiled with the system. But, adduser is a perl script which uses useradd binary in back-end.
adduser is more user friendly and interactive than its back-end useradd. There's no difference in features provided.
Related videos on Youtube
Comments
-
Maythux over 1 year
The Question consist of three parts
- What are the differences between them
- When to use adduser or useradd
- and why there is more than one command for the same purpose