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:
Open the terminal or command-line interface.
Type the following command, replacing "username" with the desired username:
sudo useradd usernameThis creates a new user account with the default settings.
Set a password for the new user by using the
passwdcommand. Type:sudo passwd usernameThis will prompt you to enter and confirm the new password for the user.
Optionally, you can also set additional user settings, such as their home directory or default shell, using the
usermodcommand. For example, to set the user's home directory, type:bashsudo usermod -d /home/username usernameThis will change the user's home directory to /home/username.
Finally, you can switch to the new user account using the
sucommand. Type:su - usernameThis 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 में एक उपयोगकर्ता खाता बनाने के लिए निम्नलिखित कदमों का पालन करें:
सबसे पहले, आप रूट यूजर बनने के लिए टर्मिनल में
suटाइप करें। अगले प्रवेश के लिए अपने रूट पासवर्ड को दर्ज करें।उपयोगकर्ता खाते को बनाने के लिए निम्नलिखित कमांड का उपयोग करें:
useradd उपयोगकर्ता_नाम
उदाहरण के लिए, यदि आप "john" नाम के एक उपयोगकर्ता खाते को बनाना चाहते हैं, तो निम्नलिखित कमांड का उपयोग करें:
useradd john
- एक पासवर्ड सेट करने के लिए, निम्नलिखित कमांड का उपयोग करें:
passwd उपयोगकर्ता_नाम
उदाहरण के लिए, यदि आप "john" नाम के उपयोगकर्ता खाते के लिए एक पासवर्ड सेट करना चाहते हैं, तो निम्नलिखित कमांड का उपयोग करें:
passwd john
Comments
Post a Comment