Menu
User

DropVPS Team

Writer: Cooper Reagan

How to Check Ubuntu Version with Commands

How to Check Ubuntu Version with Commands

Publication Date

03/27/2025

Category

Articles

Reading Time

2 Min

Table of Contents

If you’re working with Ubuntu, whether for personal projects or in a professional environment, knowing your version of Ubuntu is crucial. Different versions have various features, updates, and support timelines.

Method 1: Using the Command Line

The simplest way to check your Ubuntu version is through the terminal. Here’s how you can do it:

  1. Open the terminal. You can do this by pressing Ctrl + Alt + T.

  2. Type the following command and hit Enter:

    lsb_release -a

    This command will provide you with detailed information about your Ubuntu version. You will see output similar to this:

    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 20.04 LTS
    Release:        20.04
    Codename:       focal

Method 2: Checking the /etc/os-release File

Another method to find your Ubuntu version is by checking the /etc/os-release file. Here’s how:

  1. Open the terminal.

  2. Run the following command:

    cat /etc/os-release

    The output will provide you with details about your operating system, including the version. You might see something like this:

    NAME="Ubuntu"
    VERSION="20.04 LTS (Focal Fossa)"
    ID=ubuntu
    ID_LIKE=debian

    This file contains various fields that describe your Ubuntu installation.

Method 3: Using the hostnamectl Command

The hostnamectl command can also provide you with information about your Ubuntu version. Here’s how to use it:

  1. Open the terminal.

  2. Enter the following command:

    hostnamectl

    This will display system information, including the operating system version. The output will look something like this:

    Static hostname: my-ubuntu
    Icon name: computer-vm
    Chassis: vm
    Machine ID: 1234567890abcdef1234567890abcdef
    Boot ID: 1234567890abcdef1234567890abcdef
    Operating System: Ubuntu 20.04 LTS
    Kernel: Linux 5.4.0-42-generic
    Architecture: x86-64

Knowing your Ubuntu version is essential for troubleshooting, system administration, and ensuring compatibility with applications and services. Whether you prefer using the command line or the graphical interface, there are multiple ways to check your Ubuntu version. For more tips and tutorials on Ubuntu, stay tuned to dropvps.com!

Linux VPS
U
Loading...

Related Posts