in Linux/shell, how can I bring background jobs to foreground and vice versa?

link|improve this question
feedback

migrated from stackoverflow.com Dec 14 '09 at 20:17

This question came from our site for professional and enthusiast programmers.

2 Answers

Did you use ctrl+z to send it to the background? If so, you can bring it back to the front with the command

 fg

To get a list of all the background jobs, use

jobs
link|improve this answer
feedback

if you have a list of backgrounded jobs (as seen with the 'jobs' command, you can pick a particular one with

fg % number

where number = job number

e.g.

jobs

[1]    suspended  top
[2]  - suspended  top
[3]  + suspended  top

fg %2
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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