Technology Encyclopedia Home >How to create a new user on Raspbian?

How to create a new user on Raspbian?

To create a new user on Raspbian, which is the operating system for Raspberry Pi devices, you can use the adduser command in the terminal. This command allows you to add a new user account with specific permissions and settings.

Here’s how you can do it:

  1. Open the terminal on your Raspberry Pi.

  2. Type the following command and press Enter:

    sudo adduser username
    

    Replace username with the desired name for the new user.

  3. You will be prompted to enter a password for the new user. Type the password and press Enter.

  4. Confirm the password by typing it again and pressing Enter.

  5. You may also be asked to provide additional information such as the user's full name, room number, work phone, and other details. You can press Enter to skip these fields if you prefer.

  6. Once the process is complete, the new user account will be created.

For example, if you want to create a user named "piuser", you would type:

sudo adduser piuser

And follow the prompts to set a password and any additional information.

After creating the user, you can switch to that user account using the su command:

su - piuser

This method is useful for managing multiple users on a Raspberry Pi, allowing different individuals to have their own login credentials and settings.

If you are managing a fleet of Raspberry Pi devices or need more advanced user management features, consider using cloud services like Tencent Cloud for centralized user authentication and authorization.