3
What I normally do to at least get some idea of what branch we're talking about, I try to run apt-get
, pacman
, yum
and all other common package managers that I can remember off the top of my head, but I'm sure there's a better way, so: Is there a simple way of, by using shell only, identifying which linux distribution you just logged in to?
2How can I get distribution name and version number in a simple shell script? – DavidPostill – 2015-06-18T23:33:20.367
Answers involving the kernel version (e.g.
uname -a
andcat /proc/version
aren't correct, since the concept of a "distribution" is foreign to the Linux kernel. Note that the Linux system may not be from any distro at all, that is, it could be a custom-built kernel and rootfs. – sawdust – 2015-06-18T23:50:40.060@DavidPostill It would be great if
/etc/lsb-release
was more de facto - it was only present on 1 of the 4 I tried below. – Paul – 2015-06-18T23:58:03.120lsb-release is usually optional – Thomas Dickey – 2015-06-19T00:10:12.420
Cat /etc/release – Alec Istomin – 2015-06-19T04:03:39.137