To create a new user account on a Linux system, you can use the useradd
command. The useradd
command is a command-line utility for creating user accounts.
Here's an example of how to use the useradd
command to create a new user account:
useradd newuser
This command will create a new user account with the username newuser
and a default set of options.
You can also use the -c
option to specify the user's full name, and the -m
option to create the user's home directory:
useradd -c "Full Name" -m newuser
This command will create a new user account with the username newuser
, the full name "Full Name", and a home directory at /home/newuser
.
Once the user account has been created, you can use the passwd
command to set the user's password:
passwd newuser