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,

    Example:
    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

Advertisements
Try Out Code2care Dev Tools:

Advertisements



Android Java Linux Microsoft Google Python macOS Notepad++ Microsoft Teams CSS PHP SharePoint Html Linux C Programs Bootstrap jQuery Sublime Android Studio Facebook Eclipse WhatsApp News MySQL Json HowTos JavaScript FTP S3


Advertisements


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, Tutorials, Trouble-Shooting steps, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.
🎉 We are celebrating the 10th years of Code2care! Thank you for all your support! We hope we made a difference.
We strong support Gender Equality & Diversity.

We stand in solidarity with Ukraine - Make a donation to UNHCR - https://donate.unhcr.org/in/en-in/ukraine-emergency