1046

5 分钟

#Bash 的 suspend 命令

suspend [OPTION]

功能

暂停当前 shell 的执行,直到收到 SIGCONT 信号时恢复。

类型

Bash 内置命令。

参数

  • OPTION 选项:
    • -f - 强制执行

#示例

$ bash          # 启动一个新的 shell    此处是外层 shell
$ suspend       # 暂停 shell 的执行     此处是内层 shell

[1]+  Stopped                 bash
$ fg            # 恢复 shell 的执行     此处是外层 shell
bash
$               #                       此处是内层 shell

#推荐阅读

#手册

更新: 2026/3/27

作者: PlanC

创建: 2026/3/27