kill & pkill & killall Flashcards

1
Q

kill

A

Send the processes identified by PID or JOBSPEC the signal named by SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then SIGTERM is assumed.

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

kill

<pid></pid>

  • <signal></signal>
  • s <signal></signal>

–signal <signal></signal>

A

<pid>, Send a signal to every <pid> listed.</pid></pid>

  • <signal></signal>
  • s <signal></signal>

–signal <signal></signal>

Specify the signal to be send. The signal can be specified using a nam of number.

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

kill

  • l
  • L
A
  • l, –list [signal], List signal names. This option has an optional argument, which will convert signal number to signal name, or other way round.
  • L, –table, List signal names in a nice table.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Signals

1

2

3

4

5

A

1) SIGHUP
2) SIGINT
3) SIGQUIT
4) SIGILL
5) SIGTRAP

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

Signals

6

7

8

9

10

A

6) SIGABRT
7) SIGBUS
8) SIGFPE
9) SIGKILL
10) SIGUSR1

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

Signals

11

12

13

14

15

A

11) SIGSEGV
12) SIGUSR2
13) SIGPIPE
14) SIGLARM
15) SIGTERM

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

pkill

A

pkill looks through the currently running processes and will send the specified signal (by default SIGTERM) to each process that matches the criteria.

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

pkill

  • e
  • c
  • f
  • g
  • G
  • i
A
  • e, –echo, Display what is killed.
  • c, –count, Count of matching processes.
  • f, –full, Use full process name to match.
  • g, –pgroup <pgid>, Match listed process group IDs.</pgid>
  • G, –group <gid>, Match real group IDs</gid>
  • i, –ignore-case, Match case insensitively.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

pkill

  • n
  • o
  • P
  • s
  • t
  • u
A
  • n, –newest, Select most recently started.
  • o, –oldest, Select least recently started.
  • P, –parent <ppid>, Match only child processes of the given parent.</ppid>
  • s, –session <sid>, Match session IDs</sid>
  • t, –terminal <tty>, Match by controlling terminal.</tty>
  • u, –euid <id>, Match by effective IDs</id>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

pkill

  • U
  • x
  • F
  • L

–ns <pid></pid>

–nslist <ns></ns>

A
  • U, –uid <id>, Match by real IDs.</id>
  • x, –exact, Match exactly with the command name.
  • F, –pidfile <file>, Read PIDs from file.</file>
  • L, –logpidfile, Fail if PID file is not locked.

–ns <pid>, Match the processes that belong to the same namespace as <pid></pid></pid>

–nslist <ns>, List which namespaces will be considered for the --ns option. Available namespaces: ipc, mnt, net, pid, user, uts.</ns>

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

killall

A

killall sends a signal to all processes running any of the specified commands. If no signal name is specified, SIGTERM is sent.

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

killall

  • e
  • I
  • g
  • y
  • o
  • i
  • l
A
  • e, –exact
  • I, –ignore-case
  • g, –process-group
  • y, –younger-than, Kill processes younger than TIME
  • o, –older-than, kill processes older than TIME
  • i, –interactive, Ask for confirmation before killing
  • l, –list, List all known signal names
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

killall

  • q
  • r
  • s
  • u
  • v
  • w
  • n
  • Z
A
  • q, –quiet
  • r, –regexp
  • s, –signal SIGNAL
  • u, –user USER, Kill only processes running as user.
  • v, –verbose
  • w, –wait, Wait for processes to die.
  • n, –ns PIS, match processes that belong to the same namespace as PID.
  • Z, –context REGEXP, Kill only processes haveing context.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly