Linux Shell Create User Account:

Linux Shell Create User Account:

 To create a new user account in Linux using the command line, you can use the useradd command. Here are the basic steps:

  1. Open the terminal or command-line interface.

  2. Type the following command, replacing "username" with the desired username:

    sudo useradd username

    This creates a new user account with the default settings.

  3. Set a password for the new user by using the passwd command. Type:

    sudo passwd username

    This will prompt you to enter and confirm the new password for the user.

  4. Optionally, you can also set additional user settings, such as their home directory or default shell, using the usermod command. For example, to set the user's home directory, type:

    bash
    sudo usermod -d /home/username username

    This will change the user's home directory to /home/username.

  5. Finally, you can switch to the new user account using the su command. Type:

    su - username

    This will switch to the new user's account and give you access to their home directory.

That's it! You have now created a new user account in Linux using the command line.


Linux में एक उपयोगकर्ता खाता बनाने के लिए निम्नलिखित कदमों का पालन करें:

  1. सबसे पहले, आप रूट यूजर बनने के लिए टर्मिनल में su टाइप करें। अगले प्रवेश के लिए अपने रूट पासवर्ड को दर्ज करें।

  2. उपयोगकर्ता खाते को बनाने के लिए निम्नलिखित कमांड का उपयोग करें:

useradd उपयोगकर्ता_नाम

उदाहरण के लिए, यदि आप "john" नाम के एक उपयोगकर्ता खाते को बनाना चाहते हैं, तो निम्नलिखित कमांड का उपयोग करें:

useradd john
  1. एक पासवर्ड सेट करने के लिए, निम्नलिखित कमांड का उपयोग करें:
passwd उपयोगकर्ता_नाम

उदाहरण के लिए, यदि आप "john" नाम के उपयोगकर्ता खाते के लिए एक पासवर्ड सेट करना चाहते हैं, तो निम्नलिखित कमांड का उपयोग करें:

passwd john

Comments

Popular posts from this blog

Introduction to Computer

History of Computer

Computer Generation