# groups

用来打印指定用户所属的工作组

## 补充说明

**groups命令** 在标准输入输出上输出指定用户所在组的组成员，每个用户属于`/etc/passwd`中指定的一个组和在`/etc/group`中指定的其他组。

### 语法

```
groups(选项)(参数)
```

### 选项

```
-help：显示命令的帮助信息；
--version：显示命令的版本信息。
```

### 参数

用户名：指定要打印所属工作组的用户名。

### 实例

显示linux用户所属的组

```
groups linux
linux : linux adm dialout cdrom plugdev lpadmin admin sambashare
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hezhiqiang.gitbook.io/linux/ming-ling/groups.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
