《鳥哥的 Linux 私房菜》笔记 - 任务管理
最后更新于
host:~$ vim ~/.bashrc # 按下 Ctrl + z
[1]+ Stopped vim .bashrc
host:~$ # 回到 bash 来执行命令host:~$ jobs
[1]- Stopped vim .bashrc # - 表示最近最后第二个被放入背景中的任务
[2]+ Stopped vim .vimrc # + 表示最近被放入背景中的任务,host:~$ fg %1 # 重新进入 Vim,符号 % 是可选的host:~$ git clone https://github.com/xxx/xxx # 按下 Ctrl + z
[1]+ Stopped git clone https://github.com/xxx/xxx
host:~$ bg %1 # 运行 git clone 命令,符号 % 是可选的host:~$ kill -15 %1 # 符号 % 是必选的
host:~$ kill -SIGTERM %1 # 符号 % 是必选的host:~$ nohup [命令和参数] # 在 terminal 前景中执行
host:~$ nohup [命令和参数] & # 在 terminal 背景中执行