How to get Linux distribution name and version?

后端 未结 8 1849
轻奢々
轻奢々 2021-02-04 06:28

In Windows I read the registry key SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProductName to get the full name and version of the OS.

But in Linux, th

相关标签:
8条回答
  • 2021-02-04 07:32

    Try:

    cat /etc/lsb-release
    

    You can also try

    lsb_release -a
    

    Or:

    cat /proc/version
    
    0 讨论(0)
  • 2021-02-04 07:34

    trying this way is an interesting one and less restrictive than lsb-release.

    $ cat /etc/*-release
    
    0 讨论(0)
提交回复
热议问题