By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
Cloudbooklet Logo
  • Artificial Intelligence
  • Applications
  • Linux
Notification

Free AI Image Generator

AI Tools
Cloudbooklet AICloudbooklet AI
Search
AI Tools
  • Artificial Intelligence
  • Applications
  • Google Cloud
  • Compute Engine
  • Linux

Top Stories

Explore the latest updated news!
Turnitin Ai

How to Use Turnitin AI Writing Detection Checker Tool

Spotify Wrapped

Spotify Wrapped 2023: Everything You Need to Know

Amazon Titan

How Amazon Titan Image Generator Can Revolutionize Generative AI

Follow US
  • About
  • Contact
  • Disclaimer
  • Privacy Policy
Cloudbooklet © 2023 All rights reserved.

Home » Linux » How to Check your Linux OS Version

Linux

How to Check your Linux OS Version

Last updated: 2021/10/04 at 10:49 AM
By Cloudbooklet
Check Linux Os Version
SHARE
Readers like you help support Cloudbooklet. When you make a purchase using links on our site, we may earn an affiliate commission.

Linux is a most popular open source OS used widely on many systems, servers and other machines like Raspberry Pi, etc. There are many variants out there in Linux which are known as distributions. The most common distributions are Ubuntu, Debian, SUSE, Mint, CentOS, Redhat, ArcLinux and many more.

It is better to know the version of your operating system when you update or install packages or installing security patches, etc.

Table of Contents
Using lsb_release commandUsing os-release fileUsing hostnamectlUsing proc fileConclusion

Some distributions like Ubuntu, Debian shows the version of the OS when you login as a welcome message. But this can be disabled manually.

In this guide you going to learn how to identify your Linux OS and the version installed on your machine.

There are many methods available out there to check the OS and version.

Using lsb_release command

This is the first command you want to try while identifying the installed OS and version. Most recent Linux distributions have this package installed which supports this command. LSB stands for Linux Standard Base which displays the basic information we need to know.

lsb_release -a
Output
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal

Using os-release file

Every Linux distributions have a os-release file inside the etc directory. This file contains the detailed information of the operating system.

cat /etc/os-release
Output
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

You can use the grep command to filter out the version line alone.

grep 'VERSION' /etc/os-release

Using hostnamectl

hostnamectl is a tool to Control Linux System Hostname. This command outputs the hostname along with other system related details.

Now we can use grep to filter the output to display only the Operating system details.

hostnamectl | grep "Operating"
Output
Operating System: Ubuntu 20.04.3 LTS

Using proc file

The proc directory has a version file which outputs the OS release information. This file doesn’t outputs the OS version, but with the information you can find the version of your distribution.

cat /proc/version
Output
Linux version 5.11.0-1020-gcp (buildd@lgw01-amd64-044) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #22~20.04.1-Ubuntu SMP Tue Sep 21 10:54:26 UTC 2021

Conclusion

Now you have learned how to identify the OS version of your Linux machine.

Thanks for your time. If you face any problem or any feedback, please leave a comment below.

TAGGED: CentOS, Debian, Ubuntu
Share This Article
Facebook Twitter Whatsapp Whatsapp LinkedIn Reddit Telegram Copy Link Print
Share
Leave a review Leave a review

Leave a review Cancel reply

Your email address will not be published. Required fields are marked *

Please select a rating!

Popular

Gpt Store
GPT Store: The Best GPTs the Internet Has to Offer
Artificial Intelligence
Homeworkify Ai
Homeworkify AI- Get Unblur Chegg Answer for Free
Artificial Intelligence
Cheater Buster Ai
CheaterBuster AI: Catch a Cheater on Tinder
Artificial Intelligence
Tiktok Tako Chatbot
TikTok Tako Chatbot: The New Viral Trend That Sends You Random Messages
Applications
- Advertisement -

Subscribe Now

loader

Subscribe to our mailing list to receives daily updates!

Email Address*

Name

Related Stories

Uncover the stories that related to the post!
Ubuntu 23.10
Linux

What’s New and Exciting in Ubuntu 23.10 Mantic Minotaur? A Comprehensive Guide

Symbolic Links In Linux
Linux

Symbolic Links in Linux: What They Are and How to Use Them

Ubuntu Password
Linux

Reset your Forgotten Ubuntu Password in 2 Minutes

&Quot; Systemd Service On Linux
Linux

How to Create a New systemd Service on Linux: A Step-by-Step Guide

Cloudbooklet Logo
  • Categories:
  • Artificial Intelligence
  • Applications
  • Google Cloud

Quick Links

  • About
  • Contact
  • Disclaimer
  • Privacy Policy
Cloudbooklet © 2023 All rights reserved.
Welcome Back!

Sign in to your account

Lost your password?