CTRL+C CTRL+D CTRL+Z CTRL+Q CTRL+S CTRL+L 区别

CTRL+C 终止fg中的程序
CTRL+D 结束input
CTRL+Z 将fg程序放入bg并且将状态设置为stopped
CTRL+Q 在终端输入ctrl+q 以后再输入的东西将不会显示 直到你按CTRL+S
CTRL+S
CTRL+L 有点像clear

这个跟fg bg jobs kill 有点关系  属于当前bash下的job control. 

放入bg的程序会在当前bash结束后自动结束, 可以用nohup 指令& 或者nohup 指令来让指令不受当前的bash影响, 即为结束当前terminal后程序仍然可以运行

输入命令stty -a 可以看到所有当前的控制命令


root@ECS-309fe459:/tmp# stty -a
speed 38400 baud; rows 61; columns 207; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc

猜你喜欢

转载自blog.csdn.net/weixin_42215229/article/details/84862903
今日推荐