Recovering from Kali Linux network manager error

I’ve been working with a virtual image of Kali recently using VMWare workstation and had a problem where the machine would work fine for a few hours and then the applications would freeze and would not allow you to open new windows or tabs(you could close existing apps)

If I restarted the virtual machine it then failed to boot. The screen would freeze on this image below and start flashing between showing the text and a black screen.

The main clue pointing the problem is the reoccurring error [Failed] Failed to start network manager:network manager 1

The first time it happened I just reinstalled the image but after the second time I thought it would be smarter to see if there was a quicker way to fix the problem. You can’t do anything from the above screen but it was possible to reinstall the network manager from recovery mode.

To do so, reboot the virtual machine and select the 2nd option from the GRUB window:

network manager 2

After that select recovery mode:

network manager 3

This will eventually ask for the root password and give you a prompt you can use to reinstall the faulty package. This will also update it if possible (which hopefully fixes the bugs causing it to crash in the first place)

sudo apt-get –reinstall install network-manager

network manager 4