如何通过命令行识别特定的Linux版本? [英] How do I identify the particular Linux flavor via command line?
本文介绍了如何通过命令行识别特定的Linux版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望能够检测到计算机上安装了哪种特定的Linux版本,例如通过命令行命令Ubuntu vs Fedora.
I'd like to be able to detect which particular Linux flavor is installed on a computer, e.g. Ubuntu vs Fedora, via a command line command.
有人推荐uname -a
,但这仅报告内核版本.
Some people recommend uname -a
, but that only reports the kernel version.
推荐答案
尝试以下命令.... 它对我有用...
Try the below command.... It worked for me...
例如,一旦您知道正在运行Red Hat,就可以使用以下方法达到目的:
Once you know that you are running Red Hat for example, you can get to the point with:
或者在Debian上:
Or on Debian:
或一般而言:
还可以使用以下命令
这篇关于如何通过命令行识别特定的Linux版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文