Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does linux see which user group the user belongs to?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Today, the editor will bring you an article about the user group to which linux users belong. The editor thinks it is very practical, so I will share it for you as a reference. Let's follow the editor and have a look.

1. First, open the "launcher" of the taskbar.

2. Find the depth terminal and click the running terminal.

Method 1. Groups command method

The groups command can view the user groups to which a user belongs, and only execute the groups command to view the user groups of the currently logged-in users of the system.

To query the user group to which a specific user belongs, you can follow the user. As shown in the following figure, query the user group to which the air user belongs.

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 the grep command. As shown in the following figure, the query shows that the air user belongs to the air and sudo user groups.

Method 3. Id command method

The id command can also view the user group to which a user belongs, execute only the id command, and view the user group to which the currently logged-in user belongs.

To query the user group to which a specific user belongs, you can follow the user. As shown in the following figure, query the user group to which the air user belongs.

The above is the introduction of the method of linux to view the user group to which the user belongs, the content is more comprehensive, the editor believes that there may be some knowledge points that we may see or use in our daily work. I hope you can learn more from this article.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report