Linux 系统管理 : suspend 命令详解

Linux suspend命令用于暂停执行shell。

suspend为shell内建指令,可暂停目前正在执行的shell。若要恢复,则必须使用SIGCONT信息。

语法

suspend [-f]

参数说明

  • -f  若目前执行的shell为登入的shell,则suspend预设无法暂停此shell。若要强迫暂停登入的shell,则必须使用-f参数。

实例

暂停shell

# suspend 
-bash: suspend: 无法挂起一个登录 shell
# suspend -f
如果你是在一个支持作业的 shell (比如 bash、zsh)中起了另一个子 shell,在子 shell 中运行了 suspend 命令,则会返回到父 shell,在父 shell 中可以用 jobs 命令看到作业号,用 fg 命令可以把挂起的子 shell 调前台运行。

猜你喜欢

转载自blog.csdn.net/yexiangcsdn/article/details/80756255