Do you want to update Ubuntu automatically on a daily basis, but you don't want to do it yourself? One of the students in the class is a Linux expert. He told me that apt-getupdate can be used, after hearing this, it is of course the joy of the Dragon Heart (it is clear that you can sneak up with a smile). Since you can get lazy, let's get lazy together. You can use the following methods to complete regular daily updates: 1. first in cron. create a new file in daily. If you want to update the file, call it upgrade: sudonano/etc/c.
Do you want to update Ubuntu automatically on a daily basis, but you don't want to do it yourself?
One of the students in the class is a Linux expert,
He told me that apt-get update can be used,
After hearing this, it is of course the joy of long heart (it is clear that you can be lazy by secretly LAUGHING ),
Since we can be lazy, let's get lazy together. You can use the following methods to complete regular daily updates:
1. First create a new file under cron. daily. Since it is to be updated, call it upgrade:
Sudo nano/etc/cron. daily/upgrade
2. Add four lines of commands to the upgrade file:
#! /Bin/sh
Apt-get update
Apt-get-y dist-upgrade
Apt-get clean
3. Do not change the permission. Therefore, you need to change it to 775 first (permission 755 is enough ):
Sudo chmod 755/etc/cron. daily/upgrade
4. If you are afraid to write an error, perform it first. If there is no error message, it is OK:
Sudo/etc/cron. daily/upgrade
5. In the end, remember to restart crond and you will be done. (You can also restart it. XD ):
$ Sudo/etc/init. d/cron restart
In this way, Ubuntu will be updated on a regular basis every day, so it is really lazy to the highest point!
If there are updates, please be blessed ~
Ubuntu can be used for testing...
In addition, if you want to know how to use apt commands, this website is quite easy to understand. I also learned this:
Http://www.linuxidc.com/Linux/2011-04/34059.htm
Note: The official saying that aptitdue is better than apt-get, so it can be replaced by aptitdue.