How to Check Linux OS Version: 2 Steps
Introduction:
Linux is a powerful and versatile operating system, but it can sometimes be challenging to navigate, especially for new users. One common question among Linux users is how to check the OS version they are currently running. In this article, we will guide you through two simple steps to answer this question.
Step 1: Open the Terminal
To check the Linux OS version, you’ll need to use the Terminal. The Terminal (also known as the command line interface or CLI) allows users to execute commands and interact with the system.
Here’s how to open the Terminal in different desktop environments:
– GNOME: Press Ctrl + Alt + T or click on “Activities,” search for “Terminal” and click on it.
– KDE: Press Alt + F2, type “konsole” and hit Enter.
– XFCE: Press Alt + F2, type “xfce4-terminal” and hit Enter.
– Cinnamon: Press Alt + F2, type “gnome-terminal” and hit Enter.
– MATE: Press Alt + F2, type “mate-terminal” and hit Enter.
Step 2: Check OS Version Using Commands
Once the Terminal is open, you can use one of the following commands to check your Linux OS version:
1.lsb_release -a
Type `lsb_release -a` in the terminal and press Enter. You will see information about your Linux distribution like its name, version number, codename, etc. This command works on most Linux distributions like Ubuntu, Debian, Fedora, etc.
Here’s an example output:
“`
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
“`
This indicates that the user is running Ubuntu 20.04 with a codename “focal”.
2.cat /etc/os-release
In case the `lsb_release` command is not available on your system, you can use the `cat /etc/os-release` command instead.
Type `cat /etc/os-release` in the terminal and press Enter. You will see various information about your Linux distribution, including its name, version ID, codename, etc.
Here’s an example output:
“`
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
“`
This indicates that the user is running Ubuntu 20.04 with a codename “Focal Fossa”.
Conclusion:
Checking your Linux OS version is quick and easy when you know the right commands to use in the Terminal. By following these two simple steps, you can identify vital information about your system and ensure that you’re using the most up-to-date version for optimal performance and security.