# 后台运行命令

后台运行命令的方法很多，screen，tmux，nohup，setsid等等，自己常用screen。

1、安装：

```
#安装screen
apt install screen tmux
```

2、简单使用：

```
#新建窗口1 按ctrl+a+d，后台运行窗口
screen -S 1

#查看后台运行的窗口
screen -ls

#恢复窗口1
screen -r 1

#不进入窗口执行命令
screen -dmS 1 <需要执行的命令>

#不进入窗口，杀死窗口进程
screen -S 1 -X quit
```


---

# 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://termux-wiki.zsxwz.com/qi-ta-yi-xie-ming-ling-xing-gong-ju/hou-tai-yun-xing-ming-ling.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.
