uname

打印系统信息,打印关于机器和运行它的操作系统的信息。如果没有提供选项,那么“uname”就相当于提供了“-s”选项。

语法

  uname [options]...

选项


 -a
 --all
     打印以下所有信息

 -m
 --machine
     打印机器(硬件)类型。

 -n
 --nodename
    打印机器的网络节点主机名。

 -p
 --processor
     打印机器的处理器类型

 -r
 --kernel-release
     打印内核版本

 -s
 --kernel-name
    打印内核名称

 -v
 --kernel-version
     打印内核版本

 -i
 --hardware-platform
     打印硬件平台或“unknown” 

 -o
 --operating-system
     打印操作系统

如果给出了多个选项或` -a ',

则按以下顺序打印所选信息:

SYSNAME NODENAME RELEASE OSVERSION MACHINE

例子:

[root@localhost ~]# uname -a     #显示系统信息 
Linux localhost.localdomain 2.6.18-238.12.1.el5 #1 SMP Tue May 31 13:23:01 EDT 2011 i686 i686 i386 GNU/Linux

[root@localhost ~]# uname -m     #显示系统类型,一般情况下,i386,i686是32位系统,X86,X86_64是64位系统
i686

[root@localhost ~]# uname -n     #查看主机名
localhost.localdomain

[root@localhost ~]# uname 
Linux

uname 命令实例:

linux命令:uname -a -a uname uname -a rootopen.com
linux命令:uname -a -a uname uname -a rootopen.com
2018-08-29 21:43:46

linux命令:uname -m -m uname uname -m rootopen.com
linux命令:uname -m -m uname uname -m rootopen.com
2018-08-29 21:42:35

linux命令:uname -r -r uname uname -r rootopen.com
linux命令:uname -r -r uname uname -r rootopen.com
2018-08-29 21:41:47

linux命令:uname -v -v uname uname -vrootopen.com
linux命令:uname -v -v uname uname -vrootopen.com
2018-08-29 21:39:40

linux命令:uname -n -n uname uname -n rootopen.com
linux命令:uname -n -n uname uname -n rootopen.com
2018-08-29 21:38:57

linux命令:uname uname unamerootopen.com
linux命令:uname uname unamerootopen.com
2018-08-29 21:37:43

linux命令:uname -a -a uname uname -arootopen.com
linux命令:uname -a -a uname uname -arootopen.com
2018-01-22 21:37:48

linux命令:uname -m -m uname uname -mrootopen.com
linux命令:uname -m -m uname uname -mrootopen.com
2018-03-27 02:46:48

linux命令:uname -m # display machine "hardware name" name" "hardware machine display # -m uname uname -m # display machine "hardware name"rootopen.com
linux命令:uname -m # display machine "hardware name" name" "hardware machine display # -m uname uname -m # display machine "hardware name"rootopen.com
2018-02-14 08:28:48

linux命令:uname -m -m uname uname -mrootopen.com
linux命令:uname -m -m uname uname -mrootopen.com
2018-05-08 14:49:48

linux命令:uname -a -a uname uname -arootopen.com
linux命令:uname -a -a uname uname -arootopen.com
2018-04-14 07:54:48

linux命令:uname -p -p uname uname -prootopen.com
linux命令:uname -p -p uname uname -prootopen.com
2018-03-16 17:06:48

Linux的Bash命令行(A-Z排序)