linux user and user group (UID and GID)

  Although I have been in contact with Linux for more than two years, I have never understood it in depth. Recently, I want to study systematically. I started to read it from the "Linux System Commands and Shell Scripting Guide" and made some records.

  Linux is a multi-user time-sharing system, and linux users and user groups belong to us when we first come into contact with Linux. Divided into: ordinary users, system users, root users. The user name is generally used to log in, but the user name is only for us to see. The machine uses a 32-bit integer to identify the user, that is, the UID.

  Ordinary user: The real user of the operating system, the UID is generally greater than 500, because the system user is numbered from 500.

  Follow the user: that is, the root user, the root user is the system administrator, and the permissions are infinite. . UID is 0.

  System user: a user that must exist when the system is running, but not the real user of the system. For example, the system needs apache to run httpd to run a website, and the mysql user needs to run the mysqld user when running the database.

  The ps aux can view the currently running process, the id command can view the current user UID, and the groups command can confirm the user group information.

  What is a user group? A user group is established to better manage Linux permissions. A UID must belong to a GID, and their previous relationship is similar to that of students and classes.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324940021&siteId=291194637