Debian: Set up auto update - how it works
If you use Debian, it is possible to set up automatic updates. In this practical tip you will learn how to do this.
Debian: Set up auto update - how it works
- The commands for updates are "apt-get update", followed by "apt-get upgrade -y".
- In order for your Debian system to update itself automatically, you must first set up a so-called cron job. The following instructions describe this process very compressed. Of course we also have more detailed instructions for this.
- To view all crontabs already created, type "crontab -e" in the terminal. Now you will see a list of all conjobs, which you can of course expand.
- A cronjob has 7 sections: the first stands for the minute in which it is to be done, the second for the hour. Then comes the day and then the month. The fifth day is the day of the week, with the numbers 0 and 7 each representing Sunday. Optionally, the user for whom the cronjob is executed is listed in the sixth section. The command is noted last.
- So if you want to perform an update every day at 5 am, you have to do the cron jobs "0 5 * * * apt-get update" and "1 5 * * * apt-get upgrade -y". As a result, the package lists are reloaded every day at 5 a.m. and the updates are confirmed and carried out at 5:01 a.m. So your Debian system always stays up to date.
In the next practical tip you will learn how to delete users under Debian.