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 username
This creates a new user account with the default settings.
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.
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:bashsudo usermod -d /home/username username
This will change the user's home directory to /home/username.
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 में एक उपयोगकर्ता खाता बनाने के लिए निम्नलिखित कदमों का पालन करें:
सबसे पहले, आप रूट यूजर बनने के लिए टर्मिनल में
su
टाइप करें। अगले प्रवेश के लिए अपने रूट पासवर्ड को दर्ज करें।उपयोगकर्ता खाते को बनाने के लिए निम्नलिखित कमांड का उपयोग करें:
useradd उपयोगकर्ता_नाम
उदाहरण के लिए, यदि आप "john" नाम के एक उपयोगकर्ता खाते को बनाना चाहते हैं, तो निम्नलिखित कमांड का उपयोग करें:
useradd john
- एक पासवर्ड सेट करने के लिए, निम्नलिखित कमांड का उपयोग करें:
passwd उपयोगकर्ता_नाम
उदाहरण के लिए, यदि आप "john" नाम के उपयोगकर्ता खाते के लिए एक पासवर्ड सेट करना चाहते हैं, तो निम्नलिखित कमांड का उपयोग करें:
passwd john
Comments
Post a Comment