After I try to kill a process (speaking of NetworkManager
, wpa_supplicant
, dhclient
) like this kill -9 PID
(also tried -1
and -15
), it reruns automatically...
How can I kill it and prevent it from respawning?
After I try to kill a process (speaking of NetworkManager
, wpa_supplicant
, dhclient
) like this kill -9 PID
(also tried -1
and -15
), it reruns automatically...
How can I kill it and prevent it from respawning?
kill -9
is a bad idea in general, since it doesn't allow the program to clean up after itself and because, as you've seen, it can sometimes be taken by the system as an unexpected crash that should be fixed by restarting what you killed.
You can achieve what you want with the following:
sudo service NetworkManager stop
sudo service wpa_supplicant stop
Note that stopping NetworkManager
also stops dhclient
. To restart them, use the following:
sudo service wpa_supplicant start
sudo service NetworkManager start
NetworkManager, wpa_supplicant, dhclient
– Vladimir Jan 26 '17 at 22:24airmon-ng
? Note that it might work even with those processes running. It just always prints that warning that some process might possibly cause problems. Try without killing them, if it works, you can leave it like that. Anyway, those processes are somehow configured to automatically respawn on exit, but I unfortunately don't remember exactly why and how to stop that... – Byte Commander Jan 26 '17 at 22:40