Ubuntu Version Check Guide: Step-by-Step for Beginners
Introduction
Ubuntu is a widely used Linux distribution loved by users around the world. However, when troubleshooting system issues or updating software, you may need to check the version of Ubuntu you are using. Since different versions may have different commands or configurations, knowing your exact version is essential. This article explains four easy methods to check your Ubuntu version, even for beginners. Each method has its own advantages, allowing you to choose the best one for your needs.

Method 1: Using the lsb_release -a
Command
The lsb_release -a
command is the most recommended method for checking your Ubuntu version. This command provides detailed information about the Ubuntu distribution, including the version and codename, making it useful for both system administrators and general users.
Steps:
- Open the terminal.
- Enter the following command:
bash lsb_release -a
- The output will look like this:
Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focal
Method 2: Checking the /etc/os-release
File
The /etc/os-release
file is a system file that contains detailed information about the Ubuntu version and distribution. This method uses the cat
command to display the file contents and check the OS version.
Steps:
- Open the terminal.
- Enter the following command:
bash cat /etc/os-release
- The output will be displayed as follows:
NAME="Ubuntu" VERSION="20.04.3 LTS (Focal Fossa)" ID=ubuntu PRETTY_NAME="Ubuntu 20.04.3 LTS"

Method 3: Checking the /etc/issue
File
The /etc/issue
file contains a message displayed at login, which includes Ubuntu version information. This method is very simple and is useful when you need a quick way to check the version.
Steps:
- Open the terminal.
- Enter the following command:
bash cat /etc/issue
- The output will look like this:
Ubuntu 20.04.3 LTS n l
Method 4: Using the hostnamectl
Command
The hostnamectl
command is mainly used to check or set the hostname, but it can also display Ubuntu version information. This allows system administrators to check both the hostname and OS version at the same time.
Steps:
- Open the terminal.
- Enter the following command:
bash hostnamectl
- The output will look like this:
Operating System: Ubuntu 20.04.1 LTS

Comparison Table of Methods
Method | Advantages | Best Use Case |
---|---|---|
lsb_release -a | Displays all information easily | General method for checking Ubuntu version |
/etc/os-release | Provides detailed version and support information | When you need detailed OS release information |
/etc/issue | Simple and quick | When you need to check the version at login |
hostnamectl | Checks both hostname and OS version | Useful for system and server management |
Conclusion
Checking the Ubuntu version is an important process for system management. Each method has its own advantages, and by choosing the appropriate one for your needs, you can efficiently manage your system. For beginners, the lsb_release -a
command is recommended, but knowing other methods allows for quick and detailed system checks. Making it a habit to check your version regularly will help ensure proper updates and support.