How to fix slow shutdown / restart of Ubuntu 18.04

Sometimes, Ubuntu 18.04 system hangs or takes a very long time to shutdown.

supervisor process manager takes a long time to reboot ubuntu 18.04

We can fix this by editing the system.conf file.

Go here and edit. before edit take this file for backup.

$ sudo nano /etc/systemd/system.conf

uncomment the ChangeTimeoutStopSec=90s and Change the DefaultTimeoutStopSec section to around 4 or 5 seconds.


#DefaultTimeoutStopSec=90s
DefaultTimeoutStopSec=4s

Save the file, and reboot. 🙂