Linux命令——uname

来源:互联网 发布:libreoffice软件 编辑:程序博客网 时间:2024/05/16 06:23

好记性不如烂笔头^_^

  • Linux命令uname
    • 命令简介
    • 使用方法
    • 选项详解
    • 示例

Linux命令——uname

命令简介

Uname是unix name的缩写,该命令用于打印当前系统相关信息(内核版本号、硬件架构、主机名称和操作系统类型等)。

使用方法

uname [option]

选项详解

其实这些都可以通过 –help 来查,这里相当于翻译一下

root@xqf:~# uname --helpUsage: uname [OPTION]...Print certain system information.  With no OPTION, same as -s.  -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      --help     display this help and exit      --version  output version information and exit
option 含义 -a (all)显示全部的信息 -m (machine)显示电脑类型 -n (nodename)显示在网络上的主机名称 -r (release)显示操作系统的发行编号 -s (sysname)显示操作系统名 -v (version)显示操作系统的版本 -p (processor)输出处理器类型或”unknown” -i (hardware-platform)输出硬件平台或”unknown” -o (operating-system)输出操作系统名称 –help 显示帮助 –version 显示版本信息

示例

root@xqf:~# uname -mx86_64root@xqf:~# uname -nxqfroot@xqf:~# uname -r4.2.0-27-genericroot@xqf:~# uname -v#32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016root@xqf:~# uname -px86_64root@xqf:~# uname -ix86_64root@xqf:~# uname -oGNU/Linuxroot@xqf:~# uname -aLinux xqf 4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linuxroot@xqf:~# unameLinuxroot@xqf:~# uname -sLinux
root@xqf:~# uname --versionuname (GNU coreutils) 8.21Copyright (C) 2013 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.
0 0
原创粉丝点击