加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

Linux关闭命令行正在执行的程序

发布时间:2020-12-13 23:47:34 所属栏目:Linux 来源:网络整理
导读:Ctrl + C 终止? ? 是强制中断程序的执行,进程已经终止。 Ctrl + Z? ?是将任务中止(暂停的意思),但是此任务并没有结束,他仍然在进程中他只是维持挂起的状态,用户可以使用fg/bg操作继续前台或后台的任务,fg命令重新启动前台被中断的任务,bg命令把被中断的任
  1. Ctrl + C 终止? ? 是强制中断程序的执行,进程已经终止。
  2. Ctrl + Z? ?是将任务中止(暂停的意思),但是此任务并没有结束,他仍然在进程中他只是维持挂起的状态,用户可以使用fg/bg操作继续前台或后台的任务,fg命令重新启动前台被中断的任务,bg命令把被中断的任务放在后台执行。
  3. Ctrl + S 挂起
  4. Ctrl + Q 解挂
  5. Ctrl + D 退出Shell

?

https://superuser.com/questions/262942/whats-different-between-ctrlz-and-ctrlc-in-unix-command-line

CTRL+Z stops (pauses) a job

CTRL+C terminates a job

with CTRL+C you cannot resume the process but with CTRL+Z the job can be resumed by just entering at the command promt:

fg %1

if you have multiple processes paused then you should do

jobs

to see the output and select the appropriate number to resume e.g.

fg %3

resumes the third job in the list. You can also have jobs running in the background with

bg %n

where n is the job number.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读