Go2Linux | Linux Operating System

A site dedicated to: Linux Operating System

[Ctrl+z] Stop jobs, put it in background, or resume them later.

Date: 2008-12-20 00:00:00 -0400

Another good shortcut is [Ctrl+z], which stops a currently running job, which you can later terminate or resume it, either in foreground or background.

The way to use this is to press [CTRL+z] while executing a job (task), this can be done with any application started from the console.

i.e.:

htop

Then press [CTRL+z], and htop will be stopped, you can now check the running jobs.

jobs

You will see something like this:

ggarron@gentoo ~ $ jobs 
[1]+  Stopped                 htop

Use fg, to restart the stopped program, and put it to foreground, or bg, to translate it to background.

Take note that these commands work only on the active shell, it means the one from where you start the stopped applications.

To start a program directly to background use &, i.e.

firefox &

These is the way I usually start firefox, when using fluxbox.

If you liked this article please share it.

powered by TinyLetter

If you want to contact me in any other way, please use the contact page.