How To Find and Print Linux Version with Commands?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/find-and-print-linux-version-with-commands/
PINTEREST
PINTEREST
INSTAGRAM

Linux is the kernel and there are a lot of distributions those use kernel. Distributions provides different experience and flavors to the users. Some times getting distribution and version information from a Linux box became very important. We will look how to get Linux kernel and distribution from Linux system.

Kernel Information

Kernel information can be get with uname command which is by default exists all Linux, Unix,BSD operating systems.

Kernel Information

Kernel Information

Without any parameter uname will list current operating system which is Linux.

Print Kernel Version

If we only need the kernel version of the current Linux system we should use -r parameter with uname command.

Print Kernel Version

Print Kernel Version

In this case our kernel version is 4.10.0-37-generic.

Distribution Information

Distribution information can be get different way. Getting distribution information changes from distribution to distribution but there are some common ways to use.

Proc Filesystem

We can use proc file  system to get ostype,osrelease and version information

Ubuntu

CentOS

Release File

Most of the Linux distributions like Ubuntu,  Debian, Mint, Kali, Fedora, CentOS, RHEL uses release config files to hold detailed release information .These files are stored in /etc/ with different names those ends with  release  term. We can print this information with cat command like below for all Linux distributions.

Release File

Release File

Lsb_release

Ubuntu and Debian way getting distribution information. This command can not be run on CentOS

LEARN MORE  Cockpit Easy and Web Administration of Linux

Lsb_release

Lsb_release

We will get following information about our Linux system

  • Distribution is Ubuntu
  • Distribution version or release is 17.04
  • Codename is zesty
RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/find-and-print-linux-version-with-commands/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)