- The kernel’s command-line parametersВ¶
- cpu lists:В¶
- The kernel’s command-line parametersВ¶
- cpu lists:В¶
- Как проверить версию ядра в Linux
- How to Check the Kernel Version in Linux
- В этом руководстве мы покажем вам несколько разных способов узнать, какая версия ядра Linux работает в вашей системе.
- Использование uname команды
- Используя hostnamectl команду
- Использование /proc/version файла
- Вывод
- The kernel’s command-line parameters¶
- cpu lists:В¶
- Find Linux / UNIX Kernel Version Command
- uname command to display the Linux or Unix kernel version
- Outputs from my OS X Unix desktop
- Outputs from OpenBSD Unix server
- Common uname options
- How to find the kernel version with /proc/version file ( Linux only command )
- Related media
- Package management tools ( Linux only command )
- Conclusion
The kernel’s command-line parametersВ¶
The following is a consolidated list of the kernel parameters as implemented by the __setup(), core_param() and module_param() macros and sorted into English Dictionary order (defined as ignoring all punctuation and sorting digits before letters in a case insensitive manner), and with descriptions where known.
The kernel parses parameters from the kernel command line up to “–”; if it doesn’t recognize a parameter and it doesn’t contain a ‘.’, the parameter gets passed to init: parameters with ‘=’ go into init’s environment, others are passed as command line arguments to init. Everything after “–” is passed as an argument to init.
Module parameters can be specified in two ways: via the kernel command line with a module name prefix, or via modprobe, e.g.:
Parameters for modules which are built into the kernel need to be specified on the kernel command line. modprobe looks through the kernel command line (/proc/cmdline) and collects module parameters when it loads a module, so the kernel command line can be used for loadable modules too.
Hyphens (dashes) and underscores are equivalent in parameter names, so:
can also be entered as:
Double-quotes can be used to protect spaces in values, e.g.:
cpu lists:В¶
Some kernel parameters take a list of CPUs as a value, e.g. isolcpus, nohz_full, irqaffinity, rcu_nocbs. The format of this list is:
Note that for the special case of a range one can split the range into equal sized groups and for each group use some amount from the beginning of that group:
For example one can add to the command line following parameter:
where the final item represents CPUs 100,101,125,126,150,151.
This document may not be entirely up to date and comprehensive. The command “modinfo -p $
The parameters listed below are only valid if certain kernel build options were enabled and if respective hardware is present. The text in square brackets at the beginning of each description states the restrictions within which a parameter is applicable:
In addition, the following text indicates that the option:
Parameters denoted with BOOT are actually interpreted by the boot loader, and have no meaning to the kernel directly. Do not modify the syntax of boot loader parameters without extreme need or coordination with .
There are also arch-specific kernel-parameters not documented here. See for example .
Note that ALL kernel parameters listed below are CASE SENSITIVE, and that a trailing = on the name of any parameter states that that parameter will be entered as an environment variable, whereas its absence indicates that it will appear as a kernel argument readable via /proc/cmdline by programs running once the system is up.
The number of kernel parameters is not limited, but the length of the complete command line (parameters including spaces etc.) is limited to a fixed number of characters. This limit depends on the architecture and is between 256 and 4096 characters. It is defined in the file ./include/asm/setup.h as COMMAND_LINE_SIZE.
Finally, the [KMG] suffix is commonly described after a number of kernel parameter values. These ‘K’, ‘M’, and ‘G’ letters represent the _binary_ multipliers ‘Kilo’, ‘Mega’, and ‘Giga’, equaling 2^10, 2^20, and 2^30 bytes respectively. Such letter suffixes can also be entirely omitted:
Источник
The kernel’s command-line parametersВ¶
The following is a consolidated list of the kernel parameters as implemented by the __setup(), core_param() and module_param() macros and sorted into English Dictionary order (defined as ignoring all punctuation and sorting digits before letters in a case insensitive manner), and with descriptions where known.
The kernel parses parameters from the kernel command line up to “–”; if it doesn’t recognize a parameter and it doesn’t contain a ‘.’, the parameter gets passed to init: parameters with ‘=’ go into init’s environment, others are passed as command line arguments to init. Everything after “–” is passed as an argument to init.
Module parameters can be specified in two ways: via the kernel command line with a module name prefix, or via modprobe, e.g.:
Parameters for modules which are built into the kernel need to be specified on the kernel command line. modprobe looks through the kernel command line (/proc/cmdline) and collects module parameters when it loads a module, so the kernel command line can be used for loadable modules too.
Hyphens (dashes) and underscores are equivalent in parameter names, so:
can also be entered as:
Double-quotes can be used to protect spaces in values, e.g.:
cpu lists:В¶
Some kernel parameters take a list of CPUs as a value, e.g. isolcpus, nohz_full, irqaffinity, rcu_nocbs. The format of this list is:
Note that for the special case of a range one can split the range into equal sized groups and for each group use some amount from the beginning of that group:
For example one can add to the command line following parameter:
where the final item represents CPUs 100,101,125,126,150,151.
This document may not be entirely up to date and comprehensive. The command “modinfo -p $
The parameters listed below are only valid if certain kernel build options were enabled and if respective hardware is present. The text in square brackets at the beginning of each description states the restrictions within which a parameter is applicable:
In addition, the following text indicates that the option:
Parameters denoted with BOOT are actually interpreted by the boot loader, and have no meaning to the kernel directly. Do not modify the syntax of boot loader parameters without extreme need or coordination with .
There are also arch-specific kernel-parameters not documented here. See for example .
Note that ALL kernel parameters listed below are CASE SENSITIVE, and that a trailing = on the name of any parameter states that that parameter will be entered as an environment variable, whereas its absence indicates that it will appear as a kernel argument readable via /proc/cmdline by programs running once the system is up.
The number of kernel parameters is not limited, but the length of the complete command line (parameters including spaces etc.) is limited to a fixed number of characters. This limit depends on the architecture and is between 256 and 4096 characters. It is defined in the file ./include/asm/setup.h as COMMAND_LINE_SIZE.
Finally, the [KMG] suffix is commonly described after a number of kernel parameter values. These ‘K’, ‘M’, and ‘G’ letters represent the _binary_ multipliers ‘Kilo’, ‘Mega’, and ‘Giga’, equaling 2^10, 2^20, and 2^30 bytes respectively. Such letter suffixes can also be entirely omitted:
Источник
Как проверить версию ядра в Linux
How to Check the Kernel Version in Linux
В этом руководстве мы покажем вам несколько разных способов узнать, какая версия ядра Linux работает в вашей системе.
Ядро является основным компонентом операционной системы. Он управляет ресурсами системы и является мостом между аппаратным и программным обеспечением вашего компьютера.
Существуют различные причины, по которым вам может понадобиться узнать версию ядра, работающего в вашей операционной системе GNU / Linux. Возможно, вы отлаживаете проблему, связанную с оборудованием, или узнали о новой уязвимости в системе безопасности, затрагивающей более старые версии ядра, и хотите узнать, уязвимо ли ваше ядро или нет. Какова бы ни была причина, довольно просто определить версию ядра Linux из командной строки.
Использование uname команды
Команда uname отображает несколько системных сведений, включая архитектуру ядра Linux, имя версии и выпуск.
Чтобы узнать, какая версия ядра Linux работает в вашей системе, введите следующую команду:
Вывод выше показывает, что ядро Linux является 64-битным и его версия 4.15.0-54 , где:
- 4 Версия ядра.
- 15 — Большая ревизия.
- 0 — Небольшое изменение.
- 54 — Номер патча.
- generic — Распространение конкретной информации.
Используя hostnamectl команду
Вы можете использовать grep команду для фильтрации версии ядра Linux:
Использование /proc/version файла
/proc Каталог содержит виртуальные файлы с информацией о системной памяти, ядра процессора, смонтированные файловые системы и многое другое. Информация о работающем ядре хранится в /proc/version виртуальном файле.
Используйте cat или less для отображения содержимого файла:
Вывод будет выглядеть примерно так:
Вывод
Мы показали вам, как найти версию ядра Linux, работающую в вашей системе, из командной строки. Команды должны работать во всех популярных дистрибутивах Linux, включая Debian, Red Hat, Ubuntu, Arch Linux, Fedora, CentOS, Kali Linux, OpenSUSE, Linux Mint и многие другие.
Источник
The kernel’s command-line parameters¶
The following is a consolidated list of the kernel parameters as implemented by the __setup(), early_param(), core_param() and module_param() macros and sorted into English Dictionary order (defined as ignoring all punctuation and sorting digits before letters in a case insensitive manner), and with descriptions where known.
The kernel parses parameters from the kernel command line up to “ — “; if it doesn’t recognize a parameter and it doesn’t contain a вЂ.’, the parameter gets passed to init: parameters with вЂ=’ go into init’s environment, others are passed as command line arguments to init. Everything after “ — ” is passed as an argument to init.
Module parameters can be specified in two ways: via the kernel command line with a module name prefix, or via modprobe, e.g.:
Parameters for modules which are built into the kernel need to be specified on the kernel command line. modprobe looks through the kernel command line (/proc/cmdline) and collects module parameters when it loads a module, so the kernel command line can be used for loadable modules too.
Hyphens (dashes) and underscores are equivalent in parameter names, so:
can also be entered as:
Double-quotes can be used to protect spaces in values, e.g.:
cpu lists:В¶
Some kernel parameters take a list of CPUs as a value, e.g. isolcpus, nohz_full, irqaffinity, rcu_nocbs. The format of this list is:
— (must be a positive range in ascending order)
Note that for the special case of a range one can split the range into equal sized groups and for each group use some amount from the beginning of that group:
For example one can add to the command line following parameter:
where the final item represents CPUs 100,101,125,126,150,151,…
The value “N” can be used to represent the numerically last CPU on the system, i.e “foo_cpus=16-N” would be equivalent to “16-31” on a 32 core system.
Keep in mind that “N” is dynamic, so if system changes cause the bitmap width to change, such as less cores in the CPU list, then N and any ranges using N will also change. Use the same on a small 4 core system, and “16-N” becomes “16-3” and now the same boot input will be flagged as invalid (start > end).
The special case-tolerant group name “all” has a meaning of selecting all CPUs, so that “nohz_full=all” is the equivalent of “nohz_full=0-N”.
The semantics of “N” and “all” is supported on a level of bitmaps and holds for all users of bitmap_parse() .
This document may not be entirely up to date and comprehensive. The command “modinfo -p $
The parameters listed below are only valid if certain kernel build options were enabled and if respective hardware is present. The text in square brackets at the beginning of each description states the restrictions within which a parameter is applicable:
In addition, the following text indicates that the option:
Note that ALL kernel parameters listed below are CASE SENSITIVE, and that a trailing = on the name of any parameter states that that parameter will be entered as an environment variable, whereas its absence indicates that it will appear as a kernel argument readable via /proc/cmdline by programs running once the system is up.
The number of kernel parameters is not limited, but the length of the complete command line (parameters including spaces etc.) is limited to a fixed number of characters. This limit depends on the architecture and is between 256 and 4096 characters. It is defined in the file ./include/asm/setup.h as COMMAND_LINE_SIZE.
Finally, the [KMG] suffix is commonly described after a number of kernel parameter values. These вЂK’, вЂM’, and вЂG’ letters represent the _binary_ multipliers вЂKilo’, вЂMega’, and вЂGiga’, equaling 2^10, 2^20, and 2^30 bytes respectively. Such letter suffixes can also be entirely omitted:
Источник
Find Linux / UNIX Kernel Version Command
H ow do I find out what kernel version I am currently running under Debian Linux or any other Linux distribution using a shell prompt? How do I find out Unix kernel version? How can I find out my Linux / UNIX kernel version using the ssh command?
Tutorial details | |
---|---|
Difficulty level | Easy |
Root privileges | Yes |
Requirements | Linux or Unix |
Est. reading time | 3 mintues |
- Linux Kernel version and name.
- Print the Unix machine hardware name.
- Find out about server processor type.
- Display the operating system and more.
uname command to display the Linux or Unix kernel version
This command works under all Linux distributions and other UNIX-like operating systems such as FreeBSD, OpenBSD, Solaris, HP UX, OS X and friends. Type the following command to see running kernel version:
$ uname -r
Output taken from Linux based system:
- 2 : Kernel version
- 6 : The major revision of the kernel
- 22 : The minor revision of the kernel
- 14 : Immediate fixing / bug fixing for critical error
- generic : Distribution specific sting. For example, Redhat appends string such as EL5 to indicate RHEL 5 kernel.
Another common usage is as follows:
$ uname -mrsn
Output taken from Linux:
Here is another output from RHEL 8:
My RHEL 8 kernel version
Outputs from my OS X Unix desktop
Outputs from OpenBSD Unix server
For example, at the prompt, I type the following on AIX unix to print OS name:
uname
Sample outputs:
Common uname options
Option | Description |
---|---|
-a | Behave as though the options -m, -n, -r, -s, and -v were specified. |
-i | Write the kernel ident to standard output. |
-K | Write the FreeBSD version of the kernel. |
-m | Displays the machine ID number of the hardware running the system. |
-n | Write the name of the system/node to standard output. |
-o | This is a synonym for the -s option, for compatibility with other systems. |
-p | Displays the architecture of the system processor. |
-r | Displays the release number of the operating system. |
-s | Write the name of the operating system implementation to standard output. |
-v | Write the version level of this release of the operating system to standard output. |
How to find the kernel version with /proc/version file ( Linux only command )
You can also obtain kernel version from /proc/version file by using cat command as follows:
$ less /proc/version
$ more /proc/version
$ cat /proc/version
Sample outputs:
- No ads and tracking
- In-depth guides for developers and sysadmins at Opensourceflare✨
- Join my Patreon to support independent content creators and start reading latest guides:
- How to set up Redis sentinel cluster on Ubuntu or Debian Linux
- How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
- How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
- A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
- How to protect Linux against rogue USB devices using USBGuard
Join Patreon ➔
Related media
See how to use uname and other commands to find the kernel version on Linux or Unix-like oses:
Package management tools ( Linux only command )
You can list all installed kernel and its version with the following command under RHEL / CentOS / Suse / Fedora Linux :
$ rpm -q kernel
Output:
If you are using Debian / Ubuntu , try:
$ dpkg —list | grep linux-image
Output:
Conclusion
We have shown you how to find the version of the Unix and Linux kernel running on your server/desktop/laptop/workstion from the command line. See uname man page here and here for more info.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via
Category | List of Unix and Linux commands |
---|---|
Documentation | help • mandb • man • pinfo |
Disk space analyzers | df • duf • ncdu • pydf |
File Management | cat • cp • less • mkdir • more • tree |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Linux Desktop Apps | Skype • Spotify • VLC 3 |
Modern utilities | bat • exa |
Network Utilities | NetHogs • dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • glances • gtop • jobs • killall • kill • pidof • pstree • pwdx • time • vtop |
Searching | ag • grep • whereis • which |
Shell builtins | compgen • echo • printf |
Text processing | cut • rev |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Comments on this entry are closed.
In Solaris uname -r will give you the solaris release level.
some other usefull options with uname are
uname -s [Operating system]
SunOS
uname -r [Release version]
5.8
uname -v
Generic_117350-27[OS version]
uname -a
SunOS hostname 5.8 Generic_117350-27 sun4u sparc
the last two words describes h/w name and processor respctl[equivalent to -m and -p),
I log on to different RedHat based servers, Can you please update on how to differentiate between Centos, RedHat, Oracle Linux (i.e. RedHat based distributions) sitting remotely.
# uname -a (doesn’t help)
# cat /etc/redhat-relaese (its changed to RedHat as some softwares don’t get installed otherwise.
Quite useful for beginners and mediocre persons.
i need linux fonts
cat /etc/redhat-release
this will give you redh hat version or centos version
this command return the Centos version
Newbie here….kind of got thrown in Linux admin for Centos at work due to staff reduction. Confused about something (well lots of things, but can’t seem to find the answer to this particular question).
]# rpm -qa kernel
kernel-2.6.9-89.0.15.EL
kernel-2.6.9-89.0.19.EL
kernel-2.6.9-89.0.28.EL
kernel-2.6.9-89.0.29.EL
kernel-2.6.9-78.0.22.EL
kernel-2.6.9-89.0.11.EL
kernel-2.6.9-89.0.16.EL
kernel-2.6.9-89.0.23.EL
kernel-2.6.9-89.0.25.EL
kernel-2.6.9-89.29.1.EL
kernel-2.6.9-78.0.5.EL
kernel-2.6.9-78.0.8.EL
kernel-2.6.9-78.0.13.EL
kernel-2.6.9-89.0.18.EL
]# uname -a
Linux xxx 2.6.9-78.0.22.EL #1 Thu Apr 30 19:03:25 EDT 2009 i686 athlon i386 GNU/Linux
Why does rpm -qa show kernel-2.6.9-89.0.xxxxx installed but uname -a shows 2.6.9-78.00.22.EL?
I know this probably really stupid question – sorry 🙁
Send me all shell and kernel cammond of linux or unix
Life is so easy huh? 🙂
Send me all the words in the english language and their uses ( I dont claim that this line is original 😉 )
hahaha…lol…AMukh…ur reply is perfect….life is not that easy
Thank you very much all friend
Utility uname don’t have any info about OS version, only OS platform. uname -p gives
GNU/Linux… No info there are in environment variables. But I need the info like that
openSUSE 12.1 (x86_64)… How to solve this problem? I don’t want to set some environment variable manually…
can you install linux on a computer that has another operating system already installed
Yes, this is possible.
use any VM to install multiple os on same machine
I have installed “Linux mint” I want to know the complete info of my Linux version installed like Linux version kernel version
Thank U Very Much senior and all
xcuse me bro..
i wanna install fedora on VMWARE for running shell and c programming but my vmware is not listing out fedora OS .. what i should do …
It listing out “Linux Kernel 2.6.10” Is it similar to fedora ? Can i run shell scripts and c programz .
how to get the OS manufacturer,OS version,OS serial number and number of registered users on linux machine
sudo cat /etc/passwd | grep /bin/bash
UID’s 1000 and above are valid users plus UID 0 for root
dpkg –list | grep linux-image
ii linux-image-2.6.38-11-generic 2.6.38-11.50 Linux kernel image for version 2.6.38 on x86/x86_64
rc linux-image-2.6.38-8-generic 2.6.38-8.42 Linux kernel image for version 2.6.38 on x86/x86_64
ii linux-image-3.0.0-12-generic 3.0.0-12.20 Linux kernel image for version 3.0.0 on x86/x86_64
ii linux-image-3.0.0-16-generic 3.0.0-16.29 Linux kernel image for version 3.0.0 on x86/x86_64
ii linux-image-3.0.0-17-generic 3.0.0-17.30 Linux kernel image for version 3.0.0 on x86/x86_64
ii linux-image-generic 3.0.0.17.20 Generic Linux kernel image
what does it mean 32 or 64 bit ?
when give uname -a o/p is
Linux xxxxx 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 2 17:34:21 UTC 2012 i686 i686 i386 GNU/Linux
when i do file on some executable it tells it 32 bit.
ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
Источник