Check Linux OS Version in Terminal

There are a few ways to check your kernel and linux os version, but today we will cover some commands to do this in a terminal.
Knowing how to check your kernel and linux os version in a terminal can be useful if you ever need help in a forum where they might ask for this information. You can also use this info in a bash script to determine what actions to take in your script based on the kernel and linux os version. Whatever the case may be, it’s a good idea to get familiar with these commands.
Linux OS Version
Get Linux Standard Base info:
Output:
Or:
Output:
Get Linux Standard Base version only:
Output:
Get full Linux OS information:
Output:
Or:
Output:
A few more system details:
Output:
Kernel Version
Print the kernel version:
Output:
Print the kernel version and instruction set:
Output:
Print all kernel information:
Output:
Additional kernel information:
Output:
OS type, kernel release number, and version:
Output:
Conclusion
This concludes our look at how to check your kernel and Linux OS version in terminal. You now know a few ways to obtain the kernel and linux OS information for any situation.
Как посмотреть версию Linux в терминале?
![]()
версию программы linux, которая запущена в данный момент, можно посмотреть, например, командой (приведён и пример вывода):
версию же дистрибутива можно посмотреть, например, командой (приведён и пример вывода):
больше информации — с опцией -a (приведён и пример вывода):
это если установлена программа lsb_release. к сожалению, до сих пор не во всех дистрибутивах она устанавливается по умолчанию. тогда стоит воспользоваться командой (приведён и пример вывода):
Как определить версию Linux?
Линукс — как много в этом слове эмоциональной и смысловой нагрузки. А как много разных дистрибутивов входят в это семейство И частенько требуется понять, какая конкретно версия установлена и этому помогает пакет systemd, который в настоящее время имплементирован во многие дистрибутивы.
Самый простой способ проверить версию Linux это просто использовать hostnamectl команду без каких-либо аргументов. Эта команда возвращает название дистрибутива, версию и кодовое название вместе с конкретной версией ядра.
Дополнительные способы определения
Системы управления пакетами в Linux
Если команда выше вам не помогла, следующим шагом будет проверка установленного пакетного менеджера, так как вероятность, что один из трех пакетных менеджеров все-таки установлен крайне высока.
- rpm — пакетный менеджер для систем RedHat
- dpkg — пакетный менеджер для систем Debian
- pacman — пакетный менеджер для систем Arch
Таким образом, если система использует rpm, то скорее всего у вас используется RHEL, CentOS, Fedora и т.д. Если deb, то скорее всего это Ubuntu, Debian, Mint. И соответственно в случае pacman это будет Arch или Manjaro (и им подобные).Для определения пакетного менеджера нужно ввести команду
В случае deb и rpm она вернет следующее: /usr/bin/dpkg и /bin/rpm соответственно.

Проверка версии CentOS/RHEL
Самый простой способ проверки версии CentOS это чтение файла /etc/centos-release с помощью команды cat /etc/centos-release
В свою очередь для RHEL нужно будет прочитать файл /etc/redhat-release
Команду соответственно меняем:
Думаю логика здесь понятна, для Fedora нужно будет поменять команду на fedora-release — проще некуда.
Проверка версии Debian, Mint и Ubuntu
Для Debian — подобных систем нужно прочесть файл /etc/issue:

Проверка версии Arch
Проверять версию Arch не имеет смысла, так как каждый раз при запуске команды pacman -Suy ваша система автоматически обновляется до последней версии.
Проверка системных параметров
Проверка системной архитектуры и версии ядра
Самый простой и популярный способ определения системной архитектуры и версии ядра Linux это использование команды uname с аргументом -a.
То есть команда будет выглядеть следующим образом:
В выводе будет указана версия ядра и разрядность архитектуры.

Проверка архитектуры ЦПУ
Самым простым и распространенным способом является команда:
Как видно из вывода, вместе с моделью процессора и его частотой также видна его разрядность и еще много различных параметров.
How to Check Ubuntu Version Using GUI and Terminal Commands
It is good to know what version your Ubuntu is at any given time. While certain VPS hosting providers may offer a convenient control panel to check this information, it’s not always the case. Therefore, it’s important to learn other ways to check the Ubuntu version, especially when working with virtual servers or Linux systems that may not provide a built-in graphical interface.
Every two years, there is an LTS (Long Term Support) version published, with support for at least 5 years. The current LTS version is 20.04, released in April 2020. The Ubuntu version numbers refer to the year and month of release.
Every 6 months between the LTS versions, Ubuntu releases a provisional version. This may seem like a lot, but it makes the development more controlled. Versions are usually released in April and October, with the latest being 19.10.
All other versions that are not LTS, on the other hand, have relatively short support and their goal is limited to testing new features and bug fixes.
Knowing your Ubuntu version will help you better understand what packages or applications you should be installing. So how do you check your Ubuntu version?
This article will show you how to check your Ubuntu version information using the terminal and command line, as well as the graphical interface on a desktop environment.

How to Check Ubuntu Version Through System Settings
It is possible to know which version of Ubuntu your computer is running from the graphical interface if you’re running it in a desktop environment.
- Start the Ubuntu application and open up the SystemSettings.
- Scroll to the bottom and look for the Details section and click on it.
- Locate the window with the basic information, and in it see the Ubuntu version.
As you can see in the screenshot, our system is running Ubuntu 18.04.

How to Check Ubuntu Version Through the Terminal
There are several command options we can choose for a Ubuntu version check. Some show the version directly and others give more Ubuntu description information.
- Open your terminal (CTRL + ALT + T) and then proceed.
- Run the lsb_release -a command.
- Check the output for the current Ubuntu version.
The output will look similar to this:

If you are looking for a cleaner description line of what version your Ubuntu is, use the following command:
The output of your Ubuntu version will look like this:
As a bonus, we can verify the Ubuntu hardware information of the equipment, by executing this command in the command line:
If the command doesn’t work, you most likely have to install the list hardware utility with the following command:
Other Ways to Check Ubuntu Version Through the Terminal
There are a handful of alternative commands you can use to check your Ubuntu version and information. Let’s take a look at the command cat. You can use:
With the version of Ubuntu looking like this:
Or simply typing in this command:
The output from this command will look like this:
Conclusion
Knowing different ways of checking the Ubuntu version you’re working on is something simple yet essential. Not knowing your tools, information, and system settings can complicate your work.
To summarize, you can check your Ubuntu version through the below methods:
- Check your Ubuntu version in the GUI settings
- Use the lsb_release -a or lsb_release -d command line
- Use the cat /etc/lsb-release or cat /etc/issue command line
We hope that this article has helped you check your Ubuntu version information through the graphical interface or the terminal, and both methods are quick and easy. If you have any questions or tips, feel free to leave us a comment in the section below.
Learn What Else Your Ubuntu Can Do
Edward is a content editor with years of experience in IT writing, marketing, and Linux system administration. His goal is to encourage readers to establish an impactful online presence. He also really loves dogs, guitars, and everything related to space.