Skip to main content

Add new user in linux with home directory and /bin/bash

Published 1 min readMarkdown
Add new user in linux with home directory and /bin/bash
sudo useradd -s /bin/bash -m -c "Full Name" user

The command is composed of:

  • sudo: We need administrator privileges to allow a new user to access the computer.

  • useradd: The useradd command.

  • -s /bin/bash: The shell option. This sets the default shell for this new user.

  • -m: The make home directory option. This creates a directory in the “/home/” directory, with the same name as the new user account name.

  • -c “Full Name”: The full name of the new user. This is optional.

  • user: The name of the new user account. This must be unique. It cannot already be in use for another user.

No comments yet. Be the first to comment.

More from this blog