Free Hosting Online for WorkStations

< Previous | Contents | Next >

Returning A Process To The Foreground

A process in the background is immune from keyboard input, including any attempt inter- rupt it with a Ctrl-c. To return a process to the foreground, use the fg command, this way:


[me@linuxbox ~]$ jobs

[1]+ Running [me@linuxbox ~]$ fg %1

xlogo &

[me@linuxbox ~]$ jobs

[1]+ Running [me@linuxbox ~]$ fg %1


xlogo

xlogo


The command fg followed by a percent sign and the job number (called a jobspec) does the trick. If we only have one background job, the jobspec is optional. To terminate xl- ogo, press Ctrl-c.


Top OS Cloud Computing at OnWorks: