# write

向指定登录用户终端上发送信息

## 补充说明

**write命令** 用于向指定登录用户终端上发送信息。通过write命令可传递信息给另一位登入系统的用户，当输入完毕后，键入EOF表示信息结束，write命令就会将信息传给对方。如果接收信息的用户不只登入本地主机一次，你可以指定接收信息的终端机编号。

### 语法

```
write(参数)
```

### 参数

```
用户：指定要接受信息的登录用户；
登陆终端：指定接收信息的用户的登录终端。
```

### 实例

传信息给Rollaend，此时Rollaend只有一个连线 :

```
write Rollaend
```

接下来就是将信息打上去，结束请Ctrl+C：

传信息给Rollaend、Rollaend的连线有pts/2、pts/3：

```
write Rollaend pts/2
```

接下来就是将信息打上去，结束请Ctrl+C：

若对方设定`mesg n`，则此时信息将无法传给对方。


---

# 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/write.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.
