How the Linux system views user groups
This article mainly introduces the Linux system how to view user groups, the article is very detailed, has a certain reference value, interested friends must read it!
Method 1: groups command method, groups command can view the user group to which a user belongs
Execute only the groups command to view the group of the user currently logged in to the system
Groups wuliang, query the user group of a specific user, followed by a user name after groups.
The Linux system checks which group the user belongs to.
Method 2: view / etc/group method
/ etc/group is a user group profile, which can be viewed to query the user group to which a user belongs through grep
Cat / etc/group | grep wuliang
Method 3: id command method, id command can also view the user group to which a user belongs
Execute only the id command to view the user groups of the users currently logged in to the system
Id wuliang, query the user group of a specific user, followed by a user name after id.
The above is how the Linux system views all the contents of the user group. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!