Which TWO commands send a signal to processes selected by their NAME rather than by a numeric PID?

LPIC-1 Exam 101-500, objective 103. GNU and Unix commands medium

Draft — not checked yet. This question was written from the published exam objectives and cites the clause it comes from, but nobody has yet read it against that clause and signed for it.

It is kept out of search results and out of mock exams until they have. Read the source below before you take the answer as settled.

The options

Choose 2.

Correct killall

Correct. killall signals every process whose name matches exactly, defaulting to SIGTERM.

Correct pkill

Correct. pkill signals processes whose name matches the given pattern, and it accepts extra selectors such as -u user.

Not correct kill

Wrong. kill takes PIDs or shell job specifications like %1. Give it a name and it reports an error.

Not correct pgrep

Wrong. pgrep uses the same matching rules as pkill but only prints the PIDs it finds; it never sends a signal.

Not correct renice

Wrong. renice does not send signals at all — it changes the scheduling nice value of an existing process.

Why

killall and pkill both signal by name; kill needs PIDs; pgrep only reports them; renice changes priority. A safe habit is to run pgrep with your pattern first and confirm the list before running the same pattern through pkill.

Where this comes from

Cited
LPI exam objective 103.5
What it says
Select processes by name or by PID when signalling them.

Practise this

Reading one question is not practice. The trainer will draw a set from objective 103 and space the ones you get wrong.

Practise LPIC-1 Exam 101-500