Knowing the Linux version / OS / Kernal details

Hi All,
Greetings for the day 🙂 LIFE IS BEAUTIFUL 🙂
Background :
- Recently got a chance to work on Docker
- So I got the Linux VM from our admin team to play with Docker
- I am connected to Linux VM using SSH (Secure Shell) and I dont have any details about Linux installed, to download docker and install I want to know the which Linux os and version installed
- Since I am new to Linux (as hardcore Microsoft Guy 🙂 ) I need to google how to know the respective Linux OS and Version and hence birth of this article 🙂
After bit googling I found three ways to to get the OS details on Linux
Using cat command – execute following command
cat /etc/os-release
Sample output :
NAME="Linux Server"
VERSION="7.8"
ID="Linux"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.8"
PRETTY_NAME="Linux Server 7.8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:linux:7:8:server"
HOME_URL="https://linux.oracle.com/"

- The cat command is used for
- To display text file
- To read text file
- to create new text file
- File concatenation
- To combine text and binary files
Using lbs_release command
$ lsb_release -a
Sample output :
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: LinuxOS
Description: Linux Server release 7.8
Release: 7.8
Codename: n/a

Using hostnamectl command
hostnamectl
Sample output :
Static hostname:
Icon name: computer-vm
Chassis: vm
Machine ID:
Boot ID:
Virtualization: vmware
Operating System: Server 7.8
CPE OS Name: linux:7:8:server
Kernel: Linux 4.14.35-1902.302.2.el7uek.x86_64
Architecture: x86-64

Thanks for reading 🙂 Enjoy the beautiful life 🙂 HAVE A SAFE LIFE 🙂 TAKE CARE 🙂
You must be logged in to post a comment.