本文主要是介绍linux-centos的常用操作
更改数据源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
查看内核
[root@centos02 ~]# uname -a
Linux centos02 2.6.32-642.el6.x86_64 #1 SMP Tue May 10 17:27:01 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@centos02 ~]#
[root@centos02 ~]# uname -m
x86_64
[root@centos02 ~]# hostname #查看主机名
centos02
[root@centos02 ~]# uname -n #查看主机名
centos02
[root@centos02 ~]# cat /etc/redhat-release #查看版本
CentOS release 6.10 (Final)
[root@centos02 ~]#
打补丁
[root@centos02 ~]# yum update
[root@centos02 ~]# yum upgrade