Linux命令——uname

好记性不如烂笔头^_^

Linux命令——uname

命令简介

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

使用方法

uname [option]

选项详解

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

root@xqf:~# uname --help
Usage: 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 -m
x86_64

root@xqf:~# uname -n
xqf

root@xqf:~# uname -r
4.2.0-27-generic

root@xqf:~# uname -v
#32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016

root@xqf:~# uname -p
x86_64

root@xqf:~# uname -i
x86_64

root@xqf:~# uname -o
GNU/Linux

root@xqf:~# uname -a
Linux 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/Linux

root@xqf:~# uname
Linux

root@xqf:~# uname -s
Linux
root@xqf:~# uname --version
uname (GNU coreutils) 8.21
Copyright (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
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值