简介
uname
命令用于打印当前系统相关信息(内核版本号、硬件架构、主机名称和操作系统类型等)。
语法
1 | uname(选项) |
选项
1 | -a或--all:显示全部的信息; |
实例
使用uname命令查看全部信息:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38[root@localhost ~]# uname #单独使用uname命令时相当于uname -s
Linux
[root@localhost ~]# uname -a
Linux localhost 2.6.18-348.6.1.el5 #1 SMP Tue May 21 15:34:22 EDT 2013 i686 i686 i386 GNU/Linux
[root@localhost ~]# uname -m
i686
[root@localhost ~]# uname -n
localhost
[root@localhost ~]# uname -r
2.6.18-4-686
[root@localhost ~]# uname -s
Linux
[root@localhost ~]# uname -v
1 SMP Tue May 21 15:34:22 EDT 2013
[root@localhost ~]# uname -p
i686
[root@localhost ~]# uname -i
i386
[root@localhost ~]# uname -o
GNU/Linux
[root@localhost ~]# uname --version
uname (GNU coreutils) 8.26
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie.