How do I identify the particular Linux flavor via command line?

后端 未结 3 1253
隐瞒了意图╮
隐瞒了意图╮ 2020-12-13 06:22

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.

Some people recommend

相关标签:
3条回答
  • 2020-12-13 06:46

    For displaying details including release and codename of the distro

    lsb_release -a
    
    0 讨论(0)
  • 2020-12-13 06:49

    I hope this works echo $(lsb_release -si)

    0 讨论(0)
  • 2020-12-13 06:57

    Try the below command.... It worked for me...

    cat /proc/version

    Once you know that you are running Red Hat for example, you can get to the point with:

    cat /etc/redhat-release

    Or on Debian:

    cat /etc/debian_version

    or in general :

    cat /etc/*-release

    Also you could use the following command

    cat /etc/issue

    0 讨论(0)
提交回复
热议问题