yum -y upgrade
yum -y update
两个命令有什么区别,看一下测试结果.
/***************************************************************************************/
在centos7.2上测试结果是:
[root@localhost ~]# cat /etc/system-release
CentOS Linux release 7.2.1511 (Core)
[root@localhost ~]# yum update -y
Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/4): base/7/x86_64/group_gz | 155 kB 00:00:03
(2/4): extras/7/x86_64/primary_db | 183 kB 00:00:03
(3/4): updates/7/x86_64/primary_db | 1.2 MB 00:00:04
(4/4): base/7/x86_64/primary_db
[root@localhost ~]# cat /etc/system-release
CentOS Linux release 7.3.1611 (Core)
-------------------------------------------------------
[root@localhost ~]# cat /etc/system-release
CentOS Linux release 7.2.1511 (Core)
[root@localhost ~]# yum upgrade -y
Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/4): base/7/x86_64/group_gz | 155 kB 00:00:03
(2/4): extras/7/x86_64/primary_db | 183 kB 00:00:03
(3/4): updates/7/x86_64/primary_db | 1.2 MB 00:00:03
(4/4): base/7/x86_64/primary_db
[root@localhost ~]# cat /etc/system-release
CentOS Linux release 7.3.1611 (Core)