![]() |
Computer Systems Lab CS1000 |
![]() Wiscinfo |
![]() CS Home |
![]() CSL |
![]() CS1000 |
![]() Feedback |
Any running program is called a process. Your shell itself is a process, hence when you execute a typical command from within the shell, two processes are actually running, even though you cannot run anything else from the shell until the command finishes. Alternatively, processes can be run in the background, giving you immediate control of the shell. If you run a process in the background, you must make sure it finishes before you logout. Leaving background processes is a violation of CSL policy and is grounds for account removal. Below follows a summary of useful commands for controlling processes. See the man pages for more information.
Process Control Commands | |
---|---|
command & | runs command in the background |
CTRL Z | suspends foreground process |
bg | runs suspended process in the background |
fg | runs suspended process in the foreground |
jobs | lists background jobs |
%n | puts background job n in foreground |
kill %n | kills background job n |
ps -x | lists all running processes owned by user |
kill procnum | kills the processes with number procnum |