Linux: What am I running? Version? Kernel? Distribution?

First, there is the whole issue of distribution. Options are ArchLinux, Ubuntu, SE, RedHat.

A quick, concise system identification happens with uname -a The results might look like:

Linux machinename 5.4.0-70-generic #78-Ubuntu SMP Fri Mar 19 13:29:52 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

This tells us we are using Linux, our kernel is 5.4, we are using a derivative of Ubuntu on a 64-bit Intel / AMD architecture.

To get more detailed information about the OS release: lsb_release -a, and you might get some result like:

No LSB modules are available.
Distributor ID:	Linuxmint
Description:	Linux Mint 20.1
Release:	20.1
Codename:	ulyssa

Another angle is to look at the file /etc/os-release. You can do that by typing cat /etc/os-release and it may reveal something like:

NAME="Linux Mint"
VERSION="20.1 (Ulyssa)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 20.1"
VERSION_ID="20.1"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.linuxmint.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=ulyssa
UBUNTU_CODENAME=focal

Ah. Now we know this is an Ubuntu derivative and that it is focal

Try cat /proc/version and now you get a clue about the Ubuntu version used:

Linux version 5.4.0-70-generic (buildd@lcy01-amd64-004) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #78-Ubuntu SMP Fri Mar 19 13:29:52 UTC 2021

We still don't have a grip on our kernel and computer architecture. Try hostnamectl and you might get a response like this:

   Static hostname: zendo
         Icon name: computer-convertible
           Chassis: convertible
        Machine ID: 1234567890abcdef1234567890abcdef
           Boot ID: 1234567890abcdef1234567890abcdef
  Operating System: Linux Mint 20.1
            Kernel: Linux 5.4.0-70-generic
      Architecture: x86-64

Now, we know our kernel version and that we are working on a 64-bit Intel / AMD system.

3 / 2021