In this guide, we want to teach you about 5 Ways To Check or Find your Ubuntu Version.
Ubuntu is an open-source OS that provides an excellent web development environment. However, it isn’t perfect and may not integrate with all the latest software. Therefore, you might need to check your version of Ubuntu before installing new programs.
5 Ways To Check your Ubuntu Version
In this guide, you will learn to check your version in these 5 ways:
- Use the lsb_release -a command.
- Use the /etc/lsb-release or /etc/os-release command.
- Check the /etc/issue file.
- Use the hostnamectl command.
- Check the Ubuntu version in your GUI settings.
Check your Ubuntu Version From Terminal
You can check your Ubuntu version quickly using the command line (also known as the terminal).
Once you open your terminal, you can use a few different methods to find out your Ubuntu version. Let’s see what are they.
- Use lsb_release -a command
The lsb_release command displays LSB (Linux Standard Base) information about your specific Linux distribution, including version number, release codename, and distributor ID.
To do this, run the command:
In your output you will see:
Output No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04 LTS Release: 20.04 Codename: focal
You can see your Ubuntu version next to the Description heading. You can also see data about your LSB modules and the codename for your distributor.
2. Use the /etc/lsb-release or /etc/os-release command
/etc/lsb-release file is a file that some, but not all, Linux distributions put there for older programs to use. The “lsb” refers to the Linux Standard Base, a project working to define a common set of standards for any Linux distribution to follow, including things like filesystem layout.
/etc/os-release is a standard Linux file used to identify the OS, os-release, and similar distros. It’s now a standard file in systemd distros, but it can be found in just about every Linux distro released over the last 3-4 years.
To list the information, run the command in your terminal:
Output DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.04 DISTRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"
3. Check the /etc/issue file
The /etc/issue is a text file that contains a message or system identification to be printed before the login prompt.
Output Ubuntu 20.04 LTS \n \l
4. Use the hostnamectl command
hostnamectl command provides a proper API used to control the Linux system hostname and change its related settings.
Here you can see both your version and your Ubuntu Linux kernel version.
Output Static hostname: ubuntu Icon name: computer-vm Chassis: vm Machine ID: ... Boot ID: ... Virtualization: ... Operating System: Ubuntu 20.04 LTS Kernel: Linux 5.4.0-29-generic Architecture: x86-64
That’s it! Those are the main methods you can use to find the version of your Ubuntu OS from your command line.
Check your Ubuntu Version from GUI
If you don’t want to use the command line to check your Ubuntu version, you can use the GUI settings instead.
To do this, you can navigate to the path below:
Applications> Settings> About
You’ll need to scroll to the bottom of the list of items to find it. You can see your server version next to the OS Name.
At this point, you learn 5 Ways To Check your Ubuntu Version.
Hope you enjoy it.
You may be interested in these articles: