Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've started a long running and machine hog process. I've hit CTRL-Z to stop it. I've then put it in the background with bg. Oops, I should have restarted with fg so that I could easily stop and start it again. What is the easiest way to stop a process that was just put into the background?

share|improve this question
up vote 4 down vote accepted

As noted, fg = foreground.

You can also try jobs to see them. Then %N can be used with fg or kill e.g. fg %4

share|improve this answer

Just run fg or fg %+. The job processing will keep track of the job and you can just tell it to go into the foreground again.

share|improve this answer

You don't need to stop it to put it into the foreground, just fg it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.