Trying to install pkill on amazonlinux 2 doesn't work:
yum install -y pkill
...
No package pkill available.
Error: Nothing to do
and my favourite search engine hasn't helped, what am I missing?
pkill is part of the procps package - this may be obvious to many but was the vital missing link which I didn't realise.
So this does the trick:
yum install -y procps
After this pkill, pgrep, ps, watch and more are now available on amazonlinux.
pkill is part of the procps package", right, as yum provides pkill would state.
dnf is preferred to yum. dnf install -y procps