Lesson 3.11: Stopping and Resuming a Process
Running the process in background
[sanjeeb@client ~]$ firefox & [1] 4760 [sanjeeb@client ~]$ jobs [1]+ Running firefox & [sanjeeb@client ~]$
Running the process in foreground
# Starting a job in foreground [sanjeeb@client ~]$ firefox # Using Cmd+Z to stop the job ^Z [1]+ Stopped firefox # Viewing the jobs [sanjeeb@client ~]$ jobs [1]+ Stopped firefox
Running the foreground process to background
[sanjeeb@client ~]$ firefox ^Z [1]+ Stopped firefox [sanjeeb@client ~]$ bg %1 [1]+ firefox & [sanjeeb@client ~]$ jobs [1]+ Running firefox &
- bg %[job id] : To resume in background
- fg %[job id] : To resume in foreground
- kill %[job id] : To terminate the job