get linux distro name code example Example 1: linux release name lsb_release -a Example 2: get linux distro from terminal dmesg | head -1