We can get help on each one of this command by running
$ compgen -b
For example we may run
$ help <Command Name>
$ help help $ help jobs $ help bg $ help fg
Now let's find the keyboard setting sequences of suspend (susp) and interrupt (intr), run
If we get something like:
$ stty -a
then ^C (Control-C) is the interrupt to abort (intr=^C) key sequence and ^Z (Control-Z) is the suspend key sequence.
speed 38400 baud; rows 27; columns 105; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol =
; eol2 = ; swtch = ; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0; -parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel iutf8 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc
When we run a command on the shell it automatically run in the foreground, thus we cannot use the terminal. We can halt (suspend) the program by holding control-z. We can then view all jobs running in the terminal by running
Our halted program would appear in a list. Suppose that our halted program is the first program, we may continue running the program in the background and continue to use the terminal by running
Alternatively we may send this program once again to foreground by running
$ bg %1
If we chose to bring the program to the foreground we won't be able to use the terminal.
$ fg %1
We may also run a command, say firefox, and send stdout and stderr to the bit bucket by running
This command (firefox) will appear in the jobs list and we may, as before, bring it to the foreground.
$ firefox &>/dev/null &