How to create new user account in Windows bash

To create a user account in bash for Windows, follow the below steps:

  1. Open Bash application on your Windows: Go to Run, type bash
  2. Type the following command: # sudo adduser userName

    you would see the below output on the console,

    Adding user `c2c20' ...
    Adding new group `c2c20' (1002) ...
    Adding new user `c2c20' (1002) with group `c2c20' ...
    Creating home directory `/home/c2c20' ...
    Copying files from `/etc/skel' ...
    New password:   
  3. Set a New password
  4. You will be asked to RE-Enter the Password.
  5. You will be prompted to add,
    • Full Name []
    • Room Number []
    • Work Phone []
    • Home Phone []
    • Other[]
  6. You will be prompted to validate the details: Is the information correct? [Y/n]
  7. You will be taken back to the # prompt.

How to login to new user created?

# su userName

Recent Posts:

Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.