1

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?

Byte Commander
  • 110,243
Vladimir
  • 121
  • 1
  • 1
  • 3

1 Answers1

0

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
Chai T. Rex
  • 5,323