Search For Answers
How do I add a new user in Linux?
Last updated: March 28, 2011
To add a new user from the command line in Linux use the useradd command.
The syntax for this command is like this:
# useradd username
This will (depending on your system's default config) create the user and the users home directory usually at /home/username
If your system is not configured by default to create the user's home directory you can use the m option to do so upon account creation.
# useradd -m username
If you want to create the user but do not want to create the home directory use the M option.
# useradd -M username