The Commands
The first thing you have to understand is the commands you will be using. There are two commands that are useful: kill and killall. The kill command is used in conjunction with a process ID (PID) and the killall command is used in conjunction with command names. Your first reaction is most likely “How do I get the PID of an application?” Well, that will take another command.
ps - list the processes running on the system
kill - send a signal to one or more processes (usually to "kill" a process)
jobs - an alternate way of listing your own processes
bg - put a process in the background
fg - put a process in the forground
Learning Shell Job control
accton - Turns process accounting on and off. Uses the file /var/log/pacct. To turn it on type "accton /var/log/pacct". Use the command with no arguments to turn it off.
kill - Kill a process by number
killall - Send a signal to a process by name
lastcomm (1) - Display information about previous commands in reverse order. Works only if process accounting is on.
nice - Set process priority of new processes.
ps(1) - Used to report the status of one or more processes.
pstree(1) - Display the tree of running processes.
renice(8) - Can be used to change the process priority of a currently running process.
sa(8) - Generates a summary of information about users' processes that are stored in the /var/log/pacct file.
skill - Report process status.
snice - Report process status.
top - Displays the processes that are using the most CPU resources.
Process Control
< Command line - misc >
Ctrl + c
Kill the current process.
Ctrl + z
Send the current process to background. This is useful if you have a program running, and you need the terminal for awhile but don't want to exit the program completely. Then just send it to background with Ctrl+z, do whatever you want, and type the command fg to get the process back.
Ctrl + d
Log out from the current terminal. If you use this in a terminal emulator under X, this usually shuts down the terminal emulator after logging you out.
Ctrl + Alt + Del
Reboot the system. You can change this behavior by editing /etc/inittab if you want the system to shut down instead of rebooting.
Terminal Shortcuts