Checking linux version ubuntu

How to check os version in Linux command line

Check os version in Linux

The procedure to find os name and version on Linux:

  1. Open the terminal application (bash shell)
  2. For remote server login using the ssh: ssh user@server-name
  3. Type any one of the following command to find os name and version in Linux:
    cat /etc/os-release
    lsb_release -a
    hostnamectl
  4. Type the following command to find Linux kernel version:
    uname -r

Let us see all examples in details for common Linux distros.

The /etc/os-release file

Type the following cat command:
$ cat /etc/os-release
Sample outputs:

We can filter out information such as OS version and name using the grep command/egrep command as follows:
$ grep ‘^VERSION’ /etc/os-release
$ egrep ‘^(VERSION|NAME)=’ /etc/os-release
Here is what we see:

Even tiny Linux distro such as Alpine Linux provide the required OS (Operating system) information, including version:

Checking OS version on Linux using the lsb_release command

The lsb_release command gives LSB (Linux Standard Base) and distribution-specific information on the CLI. The syntax is:
$ lsb_release -a
Sample outputs:

hostnamectl command

Use hostnamectl command to query and change the system hostname and related settings. Just type the following command to check OS name and Linux kernel version:
$ hostnamectl
And it will give info as follows. Look out for “ Operating System ” and “ Kernel “:

Another outputs from my OpenSUSE Linux 15.2 server:

uname command

/etc/issue file

Use more command/less command as follows:
$ cat /etc/issue
$ more /etc/issue
$ less /etc/issue

Getting help

You can also view the manual page on uname using the following command:
$ man hostnamectl
$ man uname
$ man cat

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard
Читайте также:  Как убрать надпись с рабочего стола windows 10 insider preview

Join Patreon

Conclusion

We explained how to find and display the OS version on Linux. The safest option is to query /etc/os-release file using grep or cat command. Systemd based Linux distro users can use the hostnamectl command.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Источник

How to check Ubuntu version in Linux command line

Check Ubuntu version in Linux

The procedure to find os name and version on Ubuntu Linux:

  1. Open the terminal application (bash shell) by pressing Ctrl+Alt+T
  2. For remote server login using the ssh: ssh user@server-name
  3. Type any one of the following command to find os name and version in Ubuntu:
    cat /etc/os-release
    lsb_release -a
    hostnamectl
  4. Type the following command to find Ubuntu Linux kernel version:
    uname -r

Let us see all examples in detailed to check your version.

Ubuntu Show Version Number using /etc/os-release file

Type the following cat command:
$ cat /etc/os-release
Sample outputs:

Here is another outputs:

Checking your Ubuntu version From the lsb_release terminal command

The lsb_release command gives LSB (Linux Standard Base) and distribution-specific information on the CLI. The syntax is:
$ lsb_release -a
Sample outputs:

How to check Ubuntu version using the hostnamectl command

The hostnamectl command may be used to query and change the system hostname and related settings. It can also display your Linux distribution name and kernel version as well:
$ hostnamectl

Not a fan of the Ubuntu command line? Try GUI

You can see Ubuntu version graphically, i.e. using GUI. Open System Settings by pressing the Super key on your keyboard and type “settings“. Click on Details. You will see version below Ubuntu Logo:

How do I check the version of Ubuntu I am running using GUI?

Conclusion

It is a good idea to check your Ubuntu version so that you can apply patches and update versions for security and performance reasons. Ubuntu release cycle is divided into two groups:

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard

Join Patreon

  • LTS (Long Term Support) release, which is published every two years in April. For servers and stability reasons, you always need to use LTS.
  • Interim release – Every six months Canonical releases a short version of Ubuntu, which is suitable for cutting edge hardware and desktop users.

You learned how to check your current Ubuntu version through the command-line and GUI. For more info see this page here.

Читайте также:  Как удалить windows system32 driverstore filerepository

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Источник

Ubuntu Documentation

Checking your Ubuntu Version

There are two ways to check which version of Ubuntu you are running. You can either check from within Unity, or put in a short command line in the Terminal.

In Unity

Unity is the default desktop environment since Ubuntu 11.04 (Natty Narwhal). Please note that this method will only show a partial version number. If you need a full version number like 14.04.1 LTS instead of 14.04 LTS you will need to use the terminal method.

Open System Settings

Click on Details

Your version will be shown under the Ubuntu logo.

In the Terminal

This method will work no matter which version of Ubuntu or desktop environment you are running.

Open the Terminal (keyboard shortcut: Ctrl+Alt+T)

Enter the command lsb_release -a

Your version will be shown on the Description line.

CheckingYourUbuntuVersion (последним исправлял пользователь blenderudit3d 2014-11-18 13:52:51)

The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details

Источник

How to Check Your Ubuntu Version

Home » SysAdmin » How to Check Your Ubuntu Version

Ubuntu is a free, open-source Linux-based operating system, which has a long list of release versions. Finding out which Ubuntu version is running on your system can be important when troubleshooting issues or searching for installation guides.

In this tutorial, learn how to check the Ubuntu version running on your machine.

  • A system running Ubuntu
  • Access to a user account with sudo or root privileges
  • A terminal window/command line (CtrlAltT)

There are two (2) simple ways to determine the Ubuntu version installed on your server. Check the version in the terminal window or use Ubuntu’s default graphical interface.

How to Check Ubuntu Version in Terminal

If you prefer using the terminal, you can determine the Ubuntu version installed on your machine in three (3) different ways.

Check Ubuntu Version with lsb_release –a Command

  1. Open the terminal (use the Ctrl+Alt+T keyboard shortcut).
  2. Type in the following command and hit Enter:

The output displays the current version of Ubuntu. In the example seen in the image above, it is Ubuntu 18.04 (codenamed Bionic Beaver).

Check Ubuntu Version with cat /etc/lsb-release Command

Alternatively, you can use the command:

Check Ubuntu Version with cat /etc/*release Command

To get more in-depth information about the Ubuntu release, you can also use the command:

Check Ubuntu Version with hostnemctl Command

Another command that also gives you information about the Ubuntu version is the hostname command:

Check Ubuntu Version from Graphical Interface

You can quickly identify the Ubuntu version running on your system through the graphical interface.

1. First, select Activities in the top left corner.

2. In the search bar, enter Settings and click on the icon once it appears in the results.

3. In the System Settings window, click on the Details tab.

The Details section displays which Ubuntu version number you have, along with other information about your operating system.

Читайте также:  Как запустить диагностику windows 10 через командную строку

The image above indicates that the system running on the machine is Ubuntu 18.04.2 LTS (codenamed Bionic Beaver). LTS is an acronym that stands for Long-Term Support, meaning it’s a major version supported for up to 10 years.

Other Ubuntu LTS releases include:

  • Ubuntu 20.04 (Focal Fossa)
  • Ubuntu 16.04 (Xenial Xerus) which has an end of life in April 2021
  • Ubuntu 14.04 (Trusty Tahr)

After reading this article, you should know how to check which Ubuntu version you are running. Next, explore or even update the central core of the operating system, the Linux kernel.

Источник

How to check your Ubuntu version: a guide

The free Ubuntu operating system serves as a good alternative to Windows and macOS. The open-source system is highly flexible and comes with a variety of pre-installed software. Programmers can further develop its programs or use it for implementing their own software projects. But of course there will be times when you want to install additional programs. So how do you find out if your preferred software is compatible with your Ubuntu operating system? The Ubuntu version you’re using will be crucial information.

You’ll also need to know which Ubuntu version you’re running when troubleshooting. If you include the version number in your searches on forums and blogs, you’ll get a more specific answer to your questions. Keep reading to find out how to check your Ubuntu version.

Register great TLDs for less than $1 for the first year.

Why wait? Grab your favorite domain name today!

Checking the Ubuntu version in the terminal

There are two ways to check your Ubuntu version in the terminal. Both of them use a simple command entered into the command line.

Option 1: Command lsb_release -a

  1. Open the terminal using “Show Applications” or use the keyboard shortcut [Ctrl] + [Alt] + [T].
  2. Type the command “lsb_release -a” into the command line and press enter.
  3. The terminal shows the Ubuntu version you’re running under “Description” and “Release”.

The command lsb_release -a shows you the Ubuntu version you’re using.

Option 2: Read the contents of /etc/lsb-release

  1. Open the terminal using “Show Applications” or with the keyboard shortcut [Ctrl] + [Alt] + [T].
  2. Type the command “cat /etc/lsb-release” into the command line and press enter.
  3. The terminal shows the Ubuntu version you’re running under “DISTRIB_RELEASE” and “DISTRIB_DESCRIPTION”.

You can use the terminal to read the contents of the file cat /etc/lsb-release and view your Ubuntu version.

Checking the Ubuntu version in Settings

Another way to check your Ubuntu version is in the Settings. This can be done in just three clicks.

  1. Go to “Show Applications”
  2. Open “Settings”
  3. When the program is open, you’ll see “Details” at the bottom of the left menu bar. When you click on this, you’ll see information about your system on the right. The Ubuntu version is written in large text right below the Ubuntu logo.

Click on “Details” in the settings to view your Ubuntu version.

Источник

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