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.
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.
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.
The uname command displays several system information, including the Linux kernel architecture, name, version, and release.
Try the below command.... It worked for me...
Once you know that you are running Red Hat for example, you can get to the point with:
Or on Debian:
or in general :
Also you could use the following command
For displaying details including release and codename of the distro
lsb_release -a
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With