Processes and Job Control Flashcards
What command should we use to display current running processes?
ps
How can we see all the processes (not only the ones for the current session) with ps?
ps -ef
What command should we use for seeing the processes in a tree like view?
pstree
What command should we use for an interactive process viewer?
top or htop (htop is not present in some Linux Systems)
Which command should we use to run a command in the background?
command &
How can we kill a process that’s currently running in the foreground?
CTRL+c
How can we suspend a process that’s currently running in the foreground?
CTRL+z
What command should we use to activate a suspended process in the background?
bg
What command should we use to bring a process from the background to the foreground?
fg
What command should we use to kill a process?
kill
What command should we use to list all the current jobs?
jobs
What is the kill signal number?
-15 is the kill signal, -9 is a force kill signal.