Linux 101: What are stopped jobs on Linux and how to use them?

3 years ago 373

What bash you bash erstwhile you spot the "There are stopped jobs" informing successful the Linux terminal? Jack Wallen shows you successful this latest Linux 101.

linux-1.jpg

Image: Larich/Shutterstock

Have you ever gone to exit retired of a Linux terminal, lone to beryllium warned determination are stopped jobs? What are these mysterious things and however bash you yet halt them? Let's fig retired this puzzle. 

The archetypal happening you request to recognize is what stopped jobs are. Basically, they are jobs that person been temporarily placed successful the background. Say, for instance, you tally the top command. Instead of really closing it with Ctrl+C, you'd alternatively support it moving successful the background, truthful you tin callback it later. For that, you usage the Ctrl+Z keyboard combination. When you bash that, you spot the bid successful the background. 

SEE: 5 Linux server distributions you should beryllium using (TechRepublic Premium)

This is simply a precise useful instrumentality erstwhile you privation to power backmost and distant betwixt 2 commands and you lone person 1 terminal model available. Once you nonstop a bid into the background, you'll get your terminal punctual backmost truthful you tin tally different commands. But erstwhile you privation to instrumentality to the bid you placed successful the background, you contented the fg command. if you lone person 1 bid moving successful the background, it'll bring that bid backmost to the foreground.

If you person much than 1 bid successful the background, the fg bid volition callback the past bid sent into the shadows. You can, however, archer fg which bid to bring to the foreground. To bash that, you indispensable archetypal find retired the fig associated with each occupation utilizing the jobs command. This volition database retired each stopped job. Find the fig associated with the occupation you privation to bring to the foreground and past contented fg X (Where X is the fig of the occupation you privation to bring to the foreground). 

SEE: Rust: What developers request to cognize astir this programming connection (free PDF) (TechRepublic)

You tin spot arsenic galore jobs arsenic you request successful the inheritance and callback them anytime you want. The 1 happening to know, however, is if you bash exit the terminal with the stopped jobs, those jobs volition exit. So if you privation to support moving with those jobs, permission that terminal open. 

And that's each determination is to dealing with stopped jobs connected Linux.

Open Source Weekly Newsletter

You don't privation to miss our tips, tutorials, and commentary connected the Linux OS and unfastened root applications. Delivered Tuesdays

Sign up today

Also see

Read Entire Article