Processes Flashcards
How do you list processes running on the system
ps
i.e ps -aux
How do you search for a process?
pgrep >pname<
pgrep -l >name< *show name aswell as PID
ps aux | grep >name
How do you search for processes belonging to a specific user?
pgrep -u
i.e pgrep -u cloud_user -l
How do you do an inverse search for a process?
pgrep -v
i.e pgrep -v -u user *all processes not owned by user
How do you kill a process using its name?
pkill >pname
How do you list all possible kill signals?
kill -l
What is the default kill signal of pkill and kill?
15 - SIGTERM
*instructs program to close
How would you kill a program that is not responding to a standard kill signal?
9 - SIGKILL
kill -9 >PID<
*forces program to close
What is kill -SIGHUP?
1 - SIGHUP
kill -1 >PID<
hang up connection to controlling processes within terminal, is issued when closing a terminal
What is kill -SIGINT?
2 - SIGINT
kill -2 >PID<
keyboard interrupt
What is kill -SIGQUIT?
3 - SIGQUIT
process sent by controlling terminal for it to quit
What is kill -SIGSTOP?
19 - SIGSTOP
kill -19 >PID<
stop a running process (pause)
What is kill -SIGTSTP
20 - SIGTSTP
kill -20 >PID<
request a process to stop (pause), can be ignored by process
What is kill -SIGCONT?
18 - SIGCONTINUE
kill -18 >PID<
resume a stopped process
How do you close a users terminal window?
pkill -t >tty<
*get tty (terminal) from w command