uname 命令可用于大多数 UNIX 和类 UNIX 系统以及 Linux。
功能说明:uname用来获取电脑和操作系统的相关信息。
语 法:uname [-amnrsvpio][--help][--version]
补充说明:uname可显示linux主机所用的操作系统的版本、硬件的名称等基本信息。
参 数:
-a或–all 详细输出所有信息
内核名称,主机名,内核版本号,内核版本,硬件名,处理器类型,硬件平台类型,操作系统名称
uname -a
Linux server.86.com 2.6.18-8.2 #1 SMP Mon Mar 26 23:52:43 CST 2007 i686 i686 i386 GNU/Linux
-m或–machine 显示主机的硬件(CPU)名
Linux server.86.com 2.6.18-8.2 #1 SMP Mon Mar 26 23:52:43 CST 2007 i686 i686 i386 GNU/Linux
-m或–machine 显示主机的硬件(CPU)名
uname -m
i686
i686
-n或 - nodename 显示主机在网络节点上的名称或主机名称
uname -n
server.86.com
-r或–release 显示linux操作系统内核版本号
server.86.com
-r或–release 显示linux操作系统内核版本号
uname -r
2.6.18-8.2
2.6.18-8.2
-s或–sysname 显示linux内核名称
uname -s
Linux
Linux
-v 显示显示操作系统是第几个 version 版本
uname -v
#1 SMP Mon Mar 26 23:52:43 CST 2007
#1 SMP Mon Mar 26 23:52:43 CST 2007
-p 显示处理器类型或unknown
uname -p
i686
i686
-i 显示硬件平台类型或unknown
uname -i
i386
i386
-o 显示操作系统名
uname -o
GNU/Linux
GNU/Linux
-- help 获得帮助信息
-- version 显示uname版本信息
uname --version
uname (GNU coreutils) 5.97
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License < http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
uname (GNU coreutils) 5.97
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License < http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie.
转载于:https://blog.51cto.com/752034395/937188