I am new to Ubuntu.
I have installed the server version with no GUI. At 3am every morning the server restarts itself.
I don't know where to look to see if its some setting in ubuntu. I ran the 'last' command and at the bottom of the display it says - wtmp begins Fri July 3 03:00:02 2020
If its a setting in ubuntu how can I turn it off and I don't know why it would restart at the same time every day. I am using version 18.04.4
Thanks
/etc/crontab
file and see if something runs at 03:00 (displays as0 3 * * * root command_to_execute
) and if the command isrun-parts --report /etc/cron.daily
I would check the scripts in/etc/cron.daily/
. – xenoid Jul 03 '20 at 09:39unattended-upgrades
; it will install new upgrades for packages and then reboot (standard at 3:00 local time). If you set a correct mail address incrontab
the system will inform you of its intention to reboot. Moreover, when you login the day before the reboot, the system will tell you every hour on the hour that a reboot is imminent. However, every day is a bit excessive. My server reboots once every three weeks or so. You can dosudo apt update && sudo apt upgrade
yourself and see if something is wrong that forces a daily reboot. – Jos Jul 03 '20 at 09:52grep ":Unattended-Upgrade " /etc/apt/apt.conf.d/*
? – FedKad Jul 03 '20 at 09:54sudo apt autoclean && sudo apt autoremove && sudo apt update && sudo apt dist-upgrade
at least once per week. I use manual update and run this command sequence several times per week. However, the system rebooting your server *every day* means that there is a problem with the automatic update. Run the above command sequence manually to see what kind of error(s) you have... – FedKad Jul 03 '20 at 10:17apt
andapt-get
. – FedKad Jul 03 '20 at 10:27unattended-upgrades
and reboot the server whenever you feel like it. – Jos Jul 03 '20 at 10:43