Will apt upgrade, ran with yes flag, reboot if needed?

No, apt on its own won’t reboot.

You can check whether the file /var/run/reboot-required exists after running apt to see if a reboot is required. If you use unattended-upgrades, you can configure that to reboot for you.


No, apt-get will not reboot by itself, but if you want your system to reboot automatically after an update if necessary then add [ -e /var/run/reboot-required ] && sudo reboot to your command:

sudo apt-get -y upgrade; [ -e /var/run/reboot-required ] && sudo reboot

Tags:

Upgrade

Apt