top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How to run a process in background and how to bring that into foreground and then how to kill that process?

+2 votes
78 views
How to run a process in background and how to bring that into foreground and then how to kill that process?
posted Jun 16, 2014 by Aarati Mahajan

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

For running a process in background use "&" in command line. For bringing it back in foreground use command "fg jobid" and for getting job id you use command "jobs", for killing that process find PID and use kill -9 PID command. This is indeed a good Unix Command interview questions because many of programmer not familiar with background process in UNIX.

answer Jun 17, 2014 by Mohammad
Similar Questions
+6 votes

Is there any way to kill the process which went to uninterruptible sleep (D) state due of some reason without rebooting machine??

I observed one of the process went to D-state during performance runs. Now, not able to kill the process using pkill or kill commands? Finally, we have to reboot the Linux machine.

Can anyone helps me out for this situation?? I don't want to reboot the machine.

We can kill the Zombie (Z) process but not able to kill process which is in D-state.

+4 votes

So many times, we make foreground process to background process in linux system. How does it handle internally ?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...