Categories
Linux

Linux command line- How to know which Linux distribution/ linux version you are using

How to know which Linux distribution or linux version you are using from command line? Open a terminal and just type the commands “cat /etc/*-release” or “cat /proc/version”

How to know which Linux distribution or Linux version you are using from command line?

Open a terminal and just type any of the commands

  • cat /etc/*-release
  • cat /proc/version

cat /etc/*-release

ubuntu@ubuntu:~$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION=”Ubuntu 12.04.3 LTS”
NAME=”Ubuntu”
VERSION=”12.04.3 LTS, Precise Pangolin”
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=”Ubuntu precise (12.04.3 LTS)”
VERSION_ID=”12.04″

cat /proc/version

ubuntu@ubuntu:~$ cat /proc/version
Linux version 3.8.0-29-generic (buildd@panlong) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013

Find out the Kernel version:

ubuntu@ubuntu:~$ uname -a
Linux ubuntu 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux.


Learn Linux in Kolkata, Shell programming. Call (+91) 9163111390