• 查看linux版本相关命令


    Linux系统中,平常要装软件需要知道该系统相关信息,特别是刚刚进入公司,要接手某个系统,需要配置相关服务的时候,必须要先知道该系统的一些信息包括:内核版本信息、发行版本信息。

    #lsb_release -a ---能看到发行版本信息

    LSB Version:             :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch

    Distributor ID: CentOS

    Description: CentOS release 6.5 (Final)

    Release: 6.5

    Codename: Final

    #file /sbin/init  ---能看到系统为64位,内核为2.6.18(与file /bin/ls相同)

    /sbin/init: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped

    #uname -a ---看内核,看操作系统位数

    Linux ERP 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

    # getconf LONG_BIT ---直接看操作系统位数

    64

    # cat /etc/redhat-release ---查发行版

    CentOS release 6.5 (Final)

     

    # cat /etc/centos-release ---查发行版

    CentOS Linux release 7.2.1511 (Core)

    # arch ---查架构、位数

    x86_64

    # cat /etc/issue ---查发行

    CentOS release 6.5 (Final)

    Kernel on an m

    总结:文中有些命令在不同 的操作系统上显示结果会有不同,但是通过这些命令也能查到你想查的各种信息了。

  • 相关阅读:
    CodeForces 734F Anton and School
    CodeForces 733F Drivers Dissatisfaction
    CodeForces 733C Epidemic in Monstropolis
    ZOJ 3498 Javabeans
    ZOJ 3497 Mistwald
    ZOJ 3495 Lego Bricks
    CodeForces 732F Tourist Reform
    CodeForces 732E Sockets
    CodeForces 731E Funny Game
    CodeForces 731D 80-th Level Archeology
  • 原文地址:https://www.cnblogs.com/rongtangzi/p/6639223.html
Copyright © 2020-2023  润新知