C++ get linux distribution name\version

后端 未结 6 1643
悲哀的现实
悲哀的现实 2021-01-12 06:10

According to the question \" How to get Linux distribution name and version? \", to get the linux distro name and version, this works:

lsb_release -a
         


        
6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-12 06:48

    There are files named /etc/version and /etc/release which have information like whether you're using Ubuntu or Fedora, etc. (which is what the OP clarified his question to be).

提交回复
热议问题