zoukankan      html  css  js  c++  java
  • Linux 查看操作系统版本信息 uname

    Linux 查看操作系统版本信息 uname


     

    uname 命令用于显示当前系统的版本信息

    -a 选项的 uname 命令会给出当前操作系统的所有有用信息

    命令如下:

    [root@node1 /]# uname -a
    Linux node1 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

    执行效果如下:

    可以使用 -r 选项,只查看操作系统的内核信息

    [root@node1 /]# uname -r
    3.10.0-693.el7.x86_64

    效果如下:

    额外补充

    uname 命令的使用说明如下(可以使用 man uname 命令查看使用手册):

    UNAME(1)                                                                               User Commands                                                                              UNAME(1)
    
    NAME
           uname - print system information
    
    SYNOPSIS
           uname [OPTION]...
    
    DESCRIPTION
           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
    
           GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report uname translation bugs to <http://translationproject.org/team/>
    
    AUTHOR
           Written by David MacKenzie.
    
    COPYRIGHT
           Copyright ? 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.
    
    SEE ALSO
           arch(1), uname(2)
    
           The full documentation for uname is maintained as a Texinfo manual.  If the info and uname programs are properly installed at your site, the command
    
                  info coreutils 'uname invocation'
    
           should give you access to the complete manual.

     如果是 CentOS 操作系统,可以使用如下命令查看版本信息:

    [root@node1 /]# cat /etc/redhat-release 
    CentOS Linux release 7.4.1708 (Core) 

    效果如下:

  • 相关阅读:
    算法导论(1)堆排序
    Opencv--HoughCircles源码剖析
    数据结构算法应用C++语言描述——(1)C++基础知识
    Java编程的23种设计模式
    团队建设
    管理方法论和角色认知
    压力测试:怎样设计全链路压力测试平台
    09-数据库优化方案(二):写入数据量增加时,如何实现分库分表
    08-数据库优化方案(一):查询请求增加时,如何做主从分离
    07-池化技术:如何减少频繁创建数据库连接的性能损耗
  • 原文地址:https://www.cnblogs.com/miracle-luna/p/11909374.html
Copyright © 2011-2022 走看看