What is ubuntu linux version

4 Ways to check Ubuntu Version

Recently we got some questions from readers about how to check the Ubuntu version.

  • How can I check the version of Ubuntu that I am running?
  • What is the command to check the version of Ubuntu?
  • How do I find out what version of Ubuntu I have?
  • How can I tell which version of Ubuntu I am using?

Ubuntu is an open-source operating system. There are a few ways to check which version of Ubuntu you are running.

In this article, we will mostly focus on the command line methods because in Ubuntu CLI is preferred over GUI as it provides more control.

4 Commands to Check Ubuntu Version

To check the Ubuntu version, try the following commands.

  • use command cat /etc/os-release
  • use command uname -a
  • use command cat /proc/version
  • use command lsb_release -a

The best way to check Ubuntu version is to use the cat /etc/os-release command. This will print out a lot of information about your Ubuntu installation, including the version number.

You can also use the lsb_release -a, uname -a or cat /proc/version commands to check Ubuntu version.

Procedure to check Ubuntu version in Linux

  • Open the terminal application (bash shell)
  • For remote server login using the ssh: ssh user@server-name
  • Type any one of the following commands to check Ubuntu version: cat /etc/os-release, lsb_release -a, hostnamectl
  • Type the following command to find Ubuntu Linux kernel version: uname -r

Check Ubuntu version with cat /etc/os-release

The most efficient way to check Ubuntu version is using cat /etc/os-release command. Open the terminal and type cat /etc/os-release. This command will list Ubuntu distribution name and release version information. It works on almost all Ubuntu system.

This command still works if you are running a very old Ubuntu system.

Use the following command to know the OS version on our old system:
$ cat /etc/os-release

NAME=”Ubuntu”
VERSION=”20.04.2 LTS (Focal Fossa)”
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=”Ubuntu 20.04.2 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

Ubuntu releases have two codenames: the first is the main codename, and the second is the version number.

The “main codename” is the name of the release, and it’s always capitalized. The “version number” is just the number after the dash, and it’s always in lowercase.

For example, Ubuntu 20.04.2 LTS has the main codename “Focal Fossa“, and the version number is “20.04.2“.

The cat command is one of the most frequently used commands in Linux. It allows you to view the contents of a file.

Читайте также:  Линукс драйвер canon mf3228

In its simplest form, you can use the cat command like this:

This will print the contents of the file to the terminal window.

so, to view the contents of the /etc/os-release file, you would use the following command:

This will print out a lot of information about your Ubuntu installation, including the version number.

  • ———- On Red Hat Linux ———-
    $ cat /etc/redhat-release
  • ———- On CentOS Linux ———-
    $ cat /etc/centos-release
  • ———- On Fedora Linux ———-
    $ cat /etc/fedora-release
  • ———- On Debian Linux ———-
    $ cat /etc/debian_version
  • ———- On Ubuntu and Linux Mint ———-
    $ cat /etc/lsb-release
  • ———- On Gentoo Linux ———-
    $ cat /etc/gentoo-release
  • ———- On SuSE Linux ———-
    $ cat /etc/SuSE-release

Check Ubuntu version with uname command

We will use uname command to get the Ubuntu version. This command is used to print our Linux system information such as kernel version and release name, network hostname, machine hardware name, processor architecture, hardware platform and the operating system.

The command uname -a shows the version of the Linux kernel we are using, as well as additional details.

uname -a
Linux ip-10-0-0-224 5.4.0-1045-aws #47-Ubuntu SMP Tue Apr 13 07:02:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Check Ubuntu version with cat /proc/version

The /proc/version file specifies the version of the Linux kernel, the version of gcc used to compile the kernel, and the time of kernel compilation. It also contains the kernel compiler’s user name.

$ cat /proc/version
Linux version 5.4.0-1045-aws (buildd@lcy01-amd64-026) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #47-Ubuntu SMP Tue Apr 13 07:02:25 UTC 2021

Check Ubuntu version with lsb_release command

The lsb_release command is a helpful utility to find out information about our Linux installation. It displays LSB (Linux Standard Base) information about the Linux distribution.

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

Understanding Ubuntu OS

Ubuntu is an open source software platform that runs everywhere from the smartphone, the tablet and the PC to the server and cloud. Designed for efficiency, Ubuntu delivers both a rich client experience as well as a simple platform to build on top of. It’s also great for developers, with no need to install a separate SDK.

Ubuntu runs everywhere from mainframes at the world’s largest organizations, to desktops in homes all over the world, to smart devices on your wrist or in your pocket. Plus Ubuntu offers full support options for commercial users of Ubuntu Open Stack running workloads on public clouds such as Amazon Web Services, Microsoft Azure and Google Cloud Platform.

Benefits of using Ubuntu

Ubuntu is a Linux-based operating system that offers several benefits over other operating systems, such as Windows. Ubuntu is free and open source, which means you can customize it to your needs, and there are many support forums and resources available online.

  • It’s free!
  • Ubuntu is very user-friendly and easy to use.
  • Ubuntu includes a wide range of software that you can use right out of the box.
  • Ubuntu is secure and includes features to protect your privacy.
  • Ubuntu is regularly updated with new features and security updates.
Читайте также:  Test and set linux

Understanding Ubuntu version

RHEL, Fedora, Arch, CentOS, Ubuntu, Debian, OpenSUSE, Suse all are basic names of Linux distribution. Knowing the name and version of our Linux distribution can be very helpful for many patches of security.

We can get all the Ubuntu release from here. https://wiki.ubuntu.com/Releases

«>Version «>Release «>End of Standard Support «>End of Life
«>Ubuntu 21.10 «>October 14, 2021 «>July 2022 «>July 2022
«>Ubuntu 20.04.3 LTS «>August 26, 2021 «>April 2025 «>April 2030
«>Ubuntu 20.04.2 LTS «>February 4, 2021 «>April 2025 «>April 2030

Ubuntu version release lifecycle

Releases of Ubuntu are versioned by the year and month of delivery – for example, Ubuntu 21.10 was released in October 2021.

There are 2 types of Ubuntu releases: Interim and LTS. Each Ubuntu LTS is maintained for 10 years total: 5 years of standard support + 5 years of ESM. Interim releases are maintained for 9 months.

LTS or ‘Long Term Support’ releases are published every two years in April. LTS releases are the ‘enterprise grade’ releases of Ubuntu and are used the most. An estimated 95% of all Ubuntu installations are LTS releases.

Every six months between LTS versions, Canonical publishes an interim release of Ubuntu, with 21.10 being the latest example. These are production-quality releases and are supported for 9 months, with sufficient time provided for users to update, but these releases do not receive the long-term commitment of LTS releases.

David is a Cloud & DevOps Enthusiast. He has years of experience as a Linux engineer. He had working experience in AMD, EMC. He likes Linux, Python, bash, and more. He is a technical blogger and a Software Engineer. He enjoys sharing his learning and contributing to open-source.

howtouselinux.com is dedicated to providing comprehensive information on using Linux.

We hope you find our site helpful and informative.

Источник

How to Find Which Linux Version You Are Running

Logged in on a Linux system via SSH and wondering which Linux distribution is it? Here’s how to check the Linux version.

When you install a Linux distribution on your own, you know which distribution and version it is.

But if you use SSH to log in to a remote Linux server provided by an enterprise or client, you may wonder which Linux distribution and version it is.

The simplest way to check Linux version is to see the content of the /etc/os-release file:

It will show an output similar to this:

NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.1 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

As you can see, the Linux name is Ubuntu and the version is 20.04.1.

However, that’s not the only way to know the Linux distribution details. In this beginner’s tip, I’ll show you different ways to check which Linux you are running.

Find Linux distribution details

How to check Linux version

Method 1: Use /etc/os-release file

If you are familiar with the Linux directory structure, you probably already know that /etc directory contains the core configuration files of the system.

The os-release file in the /etc directory keeps the information about the Linux distribution. It gives you the distribution name, distribution version, release name or ID.

Here’s what it displays for Alpine Linux server running on Linode infrastructure.

handbook:~# cat /etc/os-release NAME="Alpine Linux" ID=alpine VERSION_ID=3.12.0 PRETTY_NAME="Alpine Linux v3.12" HOME_URL="https://alpinelinux.org/" BUG_REPORT_URL="https://bugs.alpinelinux.org/"

As you can see, the name of Linux distribution is Alpine Linux and the distribution version is 3.12.

The content of the /etc/os-release is usually different for different distributions. Distributions often use it to provide additional information like where to get support or file bugs etc.

For example, the /etc/os-release provides more lines for CentOS Linux.

NAME="CentOS Linux" VERSION="8 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="8" PLATFORM_ID="platform:el8" PRETTY_NAME="CentOS Linux 8 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:8" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-8" CENTOS_MANTISBT_PROJECT_VERSION="8" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="8" 

However, all of them provide the Linux distribution name and version so it is a pretty reliable way to know which Linux you are running. In fact, it is the most reliable way.

Method 2: Use hostnamectl command

Most Linux distributions these days use systemd. On such a system, you can use the hostnamectl command to get Linux version detail.

For the same CentOS system that you saw above, hostnamectl provides the following details:

[[email protected] ~]# hostnamectl Static hostname: localhost.localdomain Transient hostname: li2498-99.members.linode.com Icon name: computer-vm Chassis: vm Machine ID: e3fe2be3e17be3e1763bf43e8337e68b Boot ID: 33d3052bbffd44b1869bbffd4b00d26c Virtualization: kvm Operating System: CentOS Linux 8 (Core) CPE OS Name: cpe:/o:centos:centos:8 Kernel: Linux 4.18.0-147.8.1.el8_1.x86_64 Architecture: x86-64

You can see the Linux version detail in the line starting with ‘Operating System’.

The hostnamectl command is primarily used for dealing with the hostname but if it provides other details why not use it?

Method 3: Use lsb-release command

This is NOT a command that you’ll find in all Linux distributions. I think it is mostly used by Debian/Ubuntu based distributions.

You can use the lsb_release command with option -a and it will provide distribution details:

Don’t mind the No LSB modules are available line. It’s not an error of any kind.

[email protected]:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.1 LTS Release: 20.04 Codename: focal

Bonus Tip: Find Linux kernel version

Now that you know which distribution you are running, perhaps you would also like to know about the Linux kernel version running on the system.

You can get the kernel details using the uname command in any Linux distribution.

The output shows only the Linux kernel version:

handbook:~# uname -r 5.4.43-1-virt

No prizes for guessing that the above system is running on Linux kernel version 5.4.43.

I hope you find this quick tip helpful in finding Linux version detail. If you have questions or suggestions, please let me know in the comment section.

Источник

Оцените статью
Adblock
detector