命令yum update和yum upgrade区别

2022-06-22 15:13:48 浏览数 (1)

Linux升级命令:

代码语言:javascript复制
yum update
代码语言:javascript复制
yum upgrade

区别:

代码语言:javascript复制
[root@localhost ~]# yum -y update
升级所有包的同时也升级软件和系统内核
代码语言:javascript复制
[root@localhost ~]# yum -y upgrade
只升级所有包,不升级软件和系统内核

实验分别测试:

升级前:

代码语言:javascript复制
[root@localhost ~]#  cat /etc/redhat-release 
CentOS release 6.8

[root@localhost ~]#  cat /proc/version 
Linux version 2.6.32-358.el6.x86_64

yum -y upgrade升级后:

代码语言:javascript复制
[root@localhost ~]# cat /etc/redhat-release 
CentOS Linux release 7.7

[root@localhost ~]#  cat /proc/version 
Linux version 2.6.32-358.el6.x86_64

yum -y update 升级后:

代码语言:javascript复制
[root@localhost ~]# cat /etc/redhat-release 
CentOS Linux release 7.7
[root@localhost ~]# cat /proc/version 
Linux version 3.10.0-862.el7.x86_64
yum

0 人点赞