- HowTo: Ubuntu Linux Kernel Version Command
- How to find Ubuntu Linux kernel version
- How to find the Ubuntu Distribution version
- Related media
- Ubuntu kernels from Canonical
- Identifying a kernel
- Kernel and OS releases
- Kernel security
- General Availability (GA) and variant Ubuntu kernels
- Custom kernels
- Ubuntu Documentation
- Kernel
- Types
- Versions
- HowTo Upgrade or Recompile Kernel
- How to Remove unwanted Kernels from your system
- Experimental Kernel Options
- See also
- How To Find Which Linux Kernel Version Is Installed On My System
- Commands to find your Linux Kernel Version
- How to check kernel version on Linux server/desktop/laptop
- Understanding uname command options
- Find Linux kernel using /proc/version file
- How to find your Linux Kernel version using hostnamect
- Related media
- Conclusion
HowTo: Ubuntu Linux Kernel Version Command
Tutorial details | |
---|---|
Difficulty level | Easy |
Root privileges | No |
Requirements | None |
Est. reading time | 1m |
- uname command – Display name and information about current kernel.
- /proc/version file – Same as uname command.
- lsb_release command – Display Ubuntu Linux distribution version and release information.
How to find Ubuntu Linux kernel version
Type the following command:
$ uname -r
Sample outputs:
OR
$ uname -a
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 ➔
The above output indicates that I am using Linux kernel version 3.2.0 on Ubuntu. You can use the cat command to display the same information:
$ cat /proc/version
How to find the Ubuntu Distribution version
Type the following command:
$ lsb_release -a
Sample outputs:
The same information can be obtained by typing the following comamnd
$ cat /etc/lsb-release
OR
$ cat /etc/*-release
Sample outputs:
Related media
This tutorial is also available in a quick video format:
🐧 Get the latest tutorials on Linux, Open Source & DevOps via
Источник
Ubuntu kernels from Canonical
At the core of the Ubuntu operating system is the Linux kernel, which manages and controls the hardware resources like I/O (networking, storage, graphics and various user interface devices, etc.), memory and CPU for your device or computer. It is one of the first software programs a booting device loads and runs on the central processing unit (CPU). The Linux kernel manages the system’s hardware environment so other programs like the operating system’s user space programs and application software programs can run well without modification on a variety of different platforms and without needing to know very much about that underlying system.
Identifying a kernel
The easiest way to determine the kernel you’re running is to type cat /proc/version_signature on the terminal. For example:
Ubuntu 5.4.0-12.15-generic 5.4.8
This output provides important information about the kernel:
- Canonical adds » Ubuntu «
- Ubuntu kernel-release = 5.4.0-12.15-generic
- kernel version is 5.4 , which is identical to upstream stable kernel version
- .0 is an obsolete parameter left over from older upstream kernel version naming practices
- -12 application binary interface (ABI) bump for this kernel
- .15 upload number for this kernel
- -generic is kernel flavour parameter, where -generic is the default Ubuntu kernel flavour
- Mainline kernel-version = 5.4.8
Kernel and OS releases
Canonical provides long-term support (LTS) kernels for Ubuntu LTS releases. Canonical also provides interim operating system releases with updated kernels every 6 months.
For customers and business partners that don’t have specialised bleeding-edge workloads or latest hardware needs, the latest LTS release «-generic» kernel is the best option for them such as the 4.15 default kernel in Ubuntu 18.04 LTS. Customers who need the latest hardware support capability can install the latest HWE kernel such as the ones contained in interim releases, keeping in mind the shorter support lifespan associated with these kernels (9 months). HWE kernel customers are recommended to upgrade to a newer LTS release that supports their hardware and/or software needs as soon as it is available. Another option for customers is to use point releases. For example, there is an 18.04.4 point release as of February 2020, which includes an updated 5.3.x kernel but is also considered LTS, exactly like the original GA 4.15 kernel in 18.04.
Kernel security
The Canonical Kernel Team’s primary focus is the careful maintenance of kernels and their variants for regular delivery via the Ubuntu SRU process and the Canonical livepatch service. This includes rigorous management of all Linux kernel Common Vulnerabilities and Exposures (CVE) lists (with a focus on patching all high and critical CVEs) review and application of all relevant patches for all critical and serious kernel defects in the mailing lists and then rigorously testing newly updated kernels end-to-end each SRU cycle.
General Availability (GA) and variant Ubuntu kernels
The complete functionality of any given kernel is determined by the included modules and the kernel configuration for both hardware and the expected workloads that are run on it.
Kernel modules are binary programs that extend a kernel’s ability to control the computing system’s hardware or add additional system capabilities like high-performance networking or non-standard graphics, etc. The GA kernel that is shipped by default, with the Canonical Ubuntu Long Term Support (LTS) and Hardware Enablement (HWE) releases, are tuned for stable, reliable, secure, high-performance operation over a wide variety of hardware platforms and workloads.
A kernel variant is a kernel that deviates from the generic GA kernel by changes to its configuration, and/or by having modules added and/or removed.
Custom kernels
Canonical advocates for customers to use the GA kernel shipped with Ubuntu as the best and most cost-effective option in their business environment. We also offer the option for customers to customize their own Ubuntu kernels. Several of our enterprise, Telco and cloud provider customers have systems and workload needs, which justify both the time investment to optimise their kernels and the pay to develop and maintain those custom kernels over time.
© 2021 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.
Источник
Ubuntu Documentation
Kernel
What is the kernel ?
The kernel is the software that directly manages your hardware, allowing application libraries and software like GNOME and Firefox to run on many types of hardware without much difficulty. Because the Linux kernel is the core component of a GNU/Linux system, a full restart is required to complete the kernel update.
Types
Ubuntu packages the Linux kernel for a variety of architectures, including several variants of the x86 architecture. These include a 386 version, a 686 version, and versions for the AMD k6 and k7 processors. While most software for x86 processors in Ubuntu is compiled for 386 or better instruction sets, the kernel and a few other packages are specifically compiled for certain processors for speed reasons. Check the package documentation to determine what type of kernel will perform best for your processor.
Versions
Ubuntu currently packages the 3.8 kernel for optimal desktop speed and features.
Some motherboards have more than one processor on them, and some processors have multiple cores. If your computer is like this, then the SMP kernel is for you. Non-SMP kernels will not be able to take advantage of your multiple processors. However, if you do not have multiple processors, the additional code in an SMP kernel will only slow you down. Naturally, Ubuntu provides both SMP and non-SMP kernels for all supported architectures.
PAE (Physical Address Extension) allows the 32 bit version of Ubuntu to access up to 64 Gb of memory and is the standard for all members of the Ubuntu family from release 12.10 and beyond, as the non-PAE version has been dropped. For more on this please see here.
If your hardware does not support PAE, refer to the PAE pages with topics like installing, upgrading and enabling (with) PAE.
HowTo Upgrade or Recompile Kernel
The precompiled kernels that are supplied with your distro should be fine however if you wish to update or optimise (or standardise) for your platform :
From easier (1) to the more difficult (3):
1) You can Kernel/Upgrade easily using Ubuntu.
3) Run the following Terminal commands to install a new Ubuntu kernel from http://kernel.ubuntu.com/
Just press instead of a number if you get stuck on a certain question in the python script.
The script by default filters out (i.e. does not show) the release candidates. If you want the latest release candidates, please use: python kmpd.py -d
How to Remove unwanted Kernels from your system
Open the Synaptic package manager from the System->Administration menu. Click the “Search” button on the tool bar and search for «linux-image-2». The results should show every available and installed kernel. A green box on the left indicates that the package is installed. The only linux-image you want installed is the latest one. Find the package corresponding to the kernel to you running currently (this is the kernel you found in the terminal window). Make sure you keep that one. Now you can uninstall the old kernels from the list by clicking their boxes and selecting “Mark for Removal”.
Or you can uninstall kernels using the ubuntu-tweak Ubuntu PPA package.
Instructions are here:
Experimental Kernel Options
As per the Ubuntu Kernel Team, their typical Kernel configuration policy is that options marked EXPERIMENTAL are disabled by default, until a request has been made to justify enabling it. For example, one may find out if an option is marked this way via:
See also
Kernel (последним исправлял пользователь ckimes 2017-09-26 21:10:21)
The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details
Источник
How To Find Which Linux Kernel Version Is Installed On My System
I am a new proud Linux user. My question to you is – how do I check Linux Kernel version? How do I find my Linux Kernel Version installed on my PC? Any help would be greatly appreciated.
Introduction : The Linux kernel is the central (core) component of Linux operating systems. Its responsibilities include managing the system’s resources and the communication between hardware and software components. It also maintains the security of your system. Hence, finding out the version information is a good idea for patching and other sysadmin management tasks.
Tutorial details | |
---|---|
Difficulty level | Easy |
Root privileges | No |
Requirements | None |
Est. reading time | 1m |
Commands to find your Linux Kernel Version
To check Linux Kernel version, try the following commands:
- uname -r : Find Linux kernel version
- cat /proc/version : Show Linux kernel version with help of a special file
- hostnamectl | grep Kernel : For systemd based Linux distro you can use hotnamectl to display hostname and running Linux kernel version
Let us see all commands and examples in details.
How to check kernel version on Linux server/desktop/laptop
You need to use then uname command to print certain system information including kernel name. Type the following command to print kernel version number:
$ uname -r
Sample outputs:
So my Linux kernel version is 4.15.0-39, where:
- 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 ➔
- 4 : Kernel version
- 15 : Major revision
- 0 : Minor revision
- 39 : Patch level or number
- generic : Linux distro/kernel specific additional info
Understanding uname command options
To print certain system information you use uname command. It has the following options:
-a, OR —all | print all information |
-s, OR —kernel-name | print the kernel name |
-n, OR —nodename | print the network node hostname |
-r, OR —kernel-release | print the Linux kernel release |
-v, OR —kernel-version | print the kernel version |
-m, OR —machine | print the machine hardware name |
-p, OR —processor | print the processor type or “unknown” |
-i, OR —hardware-platform | print the hardware platform or “unknown” |
-o, OR —operating-system | print the operating system |
Find Linux kernel using /proc/version file
Another option is to type the following cat command:
$ cat /proc/version
Sample outputs:
How to find your Linux Kernel version using hostnamect
Type the hostnamectl command along with grep command:
$ hostnamectl
$ hostnamectl | grep Kernel
Related media
This tutorial is also available in a quick video format:
Conclusion
You learned three diffent commands to display and show Linux kernel version on screen. For more info see the following pages too:
🐧 Get the latest tutorials on Linux, Open Source & DevOps via
Источник