How do I create a new user account on Ubuntu?
2 Answers
useradd -m -g users <username>
will create the user and add them to the "users" group.
-m
adds a user directory (i.e.,/home/<username>
).-g
adds that user to a specified group. This is optional.
Look into the useradd reference for more info on using the command.
-
This is the simpler answer since this question does not specify GUI vs CLI. Aug 27, 2021 at 16:02
-
2
-
-
@NeilG Look at the manpage that was linked in the answer. There are descriptions that explain what those options do. IMO, you don't need the
-g users
, unless you want an easy way to tell which users are "users" and which are used for other purposes like service users.– BrennanAug 16, 2023 at 13:18 -
1@Brennan, I'm familiar with the
man
page (although I keep forgetting the details since I only use it rarely and have to look it up every time). I just tried to indicate stack exchange practice usually prefers answers to contain the required content, rather than just linking to somewhere else. This also helps the OP (and the rest of us) in quickly providing focused instructions that are precisely targeted to the OPs question. Sometimes this helps understanding and confidence. But either way, it's preferred to answer the question here on the site, rather than just linking.– NeilGAug 17, 2023 at 1:20
Follow these steps to create a new user in Ubuntu :
- Open Terminal by pressing Crtl+Alt+T or Search 'Terminal' in Dash.
Execute the following command in terminal
sudo apt-get install gnome-system-tools
Search "Users" in Dash
- Click and it will run the Users and Groups :
- Click Add Button to add new user
-
Compare command line option with GUI option and just decide to stop using GUI systems where a quicker, simpler and more powerful command line is available ...– NeilGMay 21, 2023 at 6:58