How to restart the network manager applet

Sometimes my network manager indicator (applet) shows as if I'm not connected to wifi (no bars) and when I right click it it says "networking disabled" although I am connected to the internet. Maybe it's a bug or something.

Running sudo service network-manager restart fixes this applet. It restarts the whole network. Does anyone know a simple way to restart just the applet? (nm-applet)


Solution 1:

You can restart nm-applet with this command from terminal:

killall nm-applet; nohup nm-applet &

or by restarting the network-manager service (which will restart nm-applet):

sudo systemctl restart network-manager

or

sudo service network-manager restart

Here is a YouTube video explaining the answer.

Solution 2:

If you have gnome, restarting the shell (Alt-F2, r, Return) might do it.