We know that Linux is a multi-user operating system. The default root user has many administrative rights. If we want others to use some of the rights, we need to create a new user. So how to add it? These commands are discussed below.
How to create a user in Linux
1. Log in to the Linux system as root and enter the terminal:
2. Use the useradd command to add a new user such as: testone, as follows:
3. For security reasons we You need to set a password, use the passwd command:
4. When we try to work as a new user, that is, switch to testone, use the su command:
This article comes from the PHP Chinese website,
Linux system tutorialcolumn, please continue to pay attention to this column for more related tutorials!
The above is the detailed content of How to create a user in Linux. For more information, please follow other related articles on the PHP Chinese website!