[email protected]:~$ audacious & [1] 3308 #运行了播放器,但终端可以继续敲命令.. [email protected]:/$ vim shishi.txt [2]+ Stopped vim shishi.txt #用记事本编辑一个文本, 后carl+z, 暂停回到终端.. [email protected]:/$ okular ^Z [3]+ Stopped okular #同上, 打开一个阅读器,回到终端, 后carl+z, 暂停回到终端.. [email protected]:/$ jobs -l [1] 3308 Running audacious & (wd: ~) [2]- 3321 Stopped vim shishi.txt [3]+ 3339 Stopped okular #查看运行的程序, 只有[1]在播放音乐,[2,3]暂停中...要显示[1,2,3]任意一个, 命令+排行, 注意[3]加号,表示命令默认执行. [email protected]:/$ fg 1 audacious (wd: ~) ^Z [1]+ Stopped audacious (wd: ~) (wd now: /) #回到播放器, 并暂停播放.. [email protected]:/$ jobs -l [1]+ 3308 Stopped audacious (wd: ~) [2] 3321 Stopped vim shishi.txt [3]- 3339 Stopped okular #从新查看, 现在播放器也暂停了.. [email protected]:/$ kill 3339 [email protected]:/$ jobs -l [1]+ 3308 Stopped audacious (wd: ~) [2] 3321 Stopped vim shishi.txt [3]- 3339 Stopped okular [email protected]:/$ #关闭阅读器, 后从新查看, 但是依然显示,(*我也不知道为什么.可能是桌面跟终端分离太大吧) 但是把阅读器调出来时它就终止..如下: [email protected]:/$ fg 3 okular Terminated [email protected]:/$ jobs -l [1]+ 3308 Stopped audacious (wd: ~) [2] 3321 Stopped vim shishi.txt #执行 fg 3 时任务栏的tab就消失了.. [email protected]:/$ bg 1 [1]+ audacious & (wd: ~) #从新播放音乐, 不影响终端继续 命令, 类似 程序 & 方式启动. [email protected]:/$ jobs -l [1]- 3308 Running audacious & (wd: ~) [2]+ 3321 Stopped vim shishi.txt [email protected]:/$ fg 2 #从新查看, 命令fg 2, 便可以继续写记事本了..音乐依然播放,(注:音乐播放器打开时是要鼠标点播放列表的,或回车一下默认上次歌曲..)
时间: 2024-10-18 09:32:24