Processes and Job Control Flashcards

1
Q

to list processes currently running type this command:

A

ps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

additional ps Options:

A

ps -e everything, all processes
ps -f full format listing
ps -ef Display all processes, full
ps -u username display username’s processes
ps -p pid display information for PID
ps -eH Display a process tree
ps -e –forest Display a process tree
pstree displays processes in a tree format
top Interactive process viewer
htop Interactive process viewer (less common not in all Distros)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

To run processes in the background:

A

“command” & start’s the command in the background
Ctrl-c kill the foreground process
Ctrl-z Suspend the foreground process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Background a suspended process

A

bg [%num]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Foreground a background process

A

fg [%num]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Kill a process by job number or PID

A

kill

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

to list jobs

A

jobs [%num]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

send a kill signal to a process

A

kill [-sig] pid
ex:
pid sig pid sig pid
kill 123 kill -15 123 kill -TERM 123 or use -9 to terminate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

to display a list of kill signals

A

kill -l

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly