登录信息
Kernel 3.10.0-957.el7.x86_64 on an x86_64:系统内核信息
-
3:主版本号,有结构性变化时才更改
-
10:次版本号,新增功能后发生变化,一般奇数为测试版,偶数为开发版
-
0:表示对次版本的修订次数或补丁包数
-
957:编译次数,每次编译可对少数程序进行优化或修改
-
el7:版本的特殊信息,有较大的随意性
-
el 代表企业版 Linux
-
pp 代表测试版 Linux
-
fc 代表 fedora core
-
rc 代表候选版本
-
-
x86_64:x86 架构 64位操作系统
配置文件 redhat-release
# 查看系统发行版本信息
[root@node ~]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
目录 /lib64
确定系统是 32 位还是 64 位的一个方法:
# 以下命令如果有结果,就是64位操作系统
[root@node]# ls -d /lib64
/lib64
uname
| -n | 显示主机名 |
| -r | 显示内核发行版本号 |
| -s | 显示内核名称 |
| -v | 显示发行时间 |
| -p | 显示主机处理器类型 |
| -o | 显示操作系统名称 |
| -i | 显示硬件平台 |
| -m | 显示硬件架构 |
| -a | 显示系统所有相关信息 |
# 查看系统架构信息
[root@node ~]# uname -a
Linux node 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
- Linux: 操作系统类别
- node: 主机名
- 3.10.0-1062.12.1.el7.x86_64: 内核版本
- #1 SMP Tue Feb 4 23:02:59 UTC 2020: 发行时间
- x86_64 x86_64 x86_64: 架构和字长
- GNU/Linux: 属于哪个项目
# 上面的信息可以单独查看
# -a,--all: print all information, in the following order,except omit -p and -i if unknown:
# -s,--kernel-name: print the kernel name
# -n,--nodename: print the network node hostname
# -r,--kernel-release: print the kernel release
# -v,--kernel-version: print the kernel version
# -m,--machine: print the machine hardware name
# -p,--processor: print the processor type or "unknown"
# -i,--hardware-platform: print the hardware platform or "unknown"
# -o,--operating-system: print the operating system
# 显示内核名称
[root@node ~]# uname -s
Linux
# 显示主机名
[root@node ~]# uname -n
node
# 显示内核发行版本号
[root@node ~]# uname -r
3.10.0-1062.12.1.el7.x86_64
# 显示发行时间
[root@node ~]# uname -v
#1 SMP Wed Feb 23 16:47:03 UTC 2022
# 64 位硬件架构
[root@node ~]# uname -m
x86_64
# 显示主机处理器类型:64 位CPU
[root@node ~]# uname -p
x86_64
# 显示硬件平台
[root@node ~]# uname -i
x86_64
# 显示操作系统名称
[root@node ~]# uname -o
GNU/Linux
# 这些选项可以组合使用
[root@node ~]# uname -nri
node 3.10.0-1062.12.1.el7.x86_64 x86_64