Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 uname -a, but that only reports the kernel version.

like image 328
mcandre Avatar asked Oct 23 '12 17:10

mcandre


People also ask

How do I know what Flavour Linux?

The command “uname -r” shows the version of the Linux kernel that you're currently using. You'll now see which Linux kernel you're using.

How do I find Linux information in terminal?

1. How to View Linux System Information. To know only the system name, you can use the uname command without any switch that will print system information or the uname -s command will print the kernel name of your system. To view your network hostname, use the '-n' switch with the uname command as shown.

Which command is used to check the Linux version?

The uname command displays several system information, including the Linux kernel architecture, name, version, and release.


2 Answers

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

like image 125
ramit girdhar Avatar answered Sep 21 '22 05:09

ramit girdhar


For displaying details including release and codename of the distro

lsb_release -a 
like image 43
Rag Sagar Avatar answered Sep 20 '22 05:09

Rag Sagar