Normally, a command is executed in the foreground, which means it can read input from the keyboard and send messages to the screen.
If you have a process that does not need to read input
from the keyboard, you can run it in the
background, without tying up your
window. To do this, end the command with an ampersand
(“&”):
command&The command will be assigned a job number that will be displayed in square brackets. You can use this job number to control the process.
Commands for process control:
Suspend the current foreground job.
stop
jobnoSuspend job
,
but it can be resumed.jobno
kill
%jobnoTerminate
.jobno
bg
%jobnoResume
in the background.jobno
fg
%jobnoResume
in the foreground.jobno
jobsShow all the current background jobs.
ps -gxShow all your processes on this machine by process ID number.
kill -9
pidKill a process using its process ID number.