コマンドラインからインストールされているすべてのLinuxカーネルをリストまたは確認する方法
Linux Kernel is the core component of a GNU/Linux operating system. Developed by Linus Torvalds in 1991, it is a free, open-source, monolithic, modular, and multitasking Unix-like kernel. In Linux, it is possible to install multiple kernels on a single system. Have you ever wondered how many Linux kernels are installed on your Linux box? In this tutorial, we will explore how to check and view all installed Linux kernels, including their versions, from the command line in different Linux operating systems.
Table of Contents
Check All Installed Linux Kernels
The method to identify all installed Linux kernel details in your system may vary depending on the Linux distribution you use. However, one of the easiest and quickest ways to accomplish this is by using the find command.
In most Linux distributions, the installed Linux kernels and their associated files are typically stored in the /boot directory. To view the list of installed kernels, you can simply examine the contents of this directory using the find command:
$ find /boot/vmli*
Sample Output from my Ubuntu 22.04 LTS desktop:
/boot/vmlinuz /boot/vmlinuz-5.19.0-42-generic /boot/vmlinuz-5.19.0-45-generic /boot/vmlinuz.old
You can also use the following command to list all installed Linux Kernels:
$ sudo find /boot -name "vmlinuz*"
The output will display a list of installed kernel files. Each file corresponds to a specific kernel version. Note that the prefix "vmlinuz" is commonly used for kernel filenames.
As you see in the above output, there are two Linux Kernels versions (5.19.0-42 and 5.19.0-45) are installed in my Ubuntu desktop machine.
To view the kernel version associated with each file, you can use the following command:
$ sudo find /boot -name "vmlinuz*" -exec file {} \;
Sample Output:
/boot/vmlinuz: symbolic link to vmlinuz-5.19.0-45-generic /boot/vmlinuz.old: symbolic link to vmlinuz-5.19.0-42-generic /boot/vmlinuz-5.19.0-42-generic: Linux kernel x86 boot executable bzImage, version 5.19.0-42-generic (buildd@lcy02-amd64-074) #43~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Apr 21 16:51:08 UTC 2, RO-rootFS, swap_dev 0XB, Normal VGA /boot/vmlinuz-5.19.0-45-generic: Linux kernel x86 boot executable bzImage, version 5.19.0-45-generic (buildd@lcy02-amd64-117) #46~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 7 15:06:04 UTC 20, RO-rootFS, swap_dev 0XB, Normal VGA
Now we will see distribution-specific methods to find out installed Linux kernel details. First, let us start from Alpine Linux.
1. Check Installed Kernels in Alpine Linux
To obtain a list of all installed kernels along with their versions, you can use the following apk command in Alpine Linux:
$ apk info -vv | grep linux
Sample Output:
libblkid-2.32-r0 - Block device identification library from util-linux <strong>linux-virt-4.14.167-r0 - Linux vanilla kernel</strong> syslinux-6.04_pre1-r1 - Boot loader for the Linux operating system
2. List Installed Kernels in Arch Linux
To view all installed in Arch Linux and its variants like EndeavourOS and Manjaro Linux, run the following pacman command:
$ pacman -Q linux
Sample Output:
linux 5.9.14.arch1-1
You can also combine pacman and grep commands to list installed Kernel versions:
$ pacman -Q | grep linux
Sample Output:
archlinux-keyring 20201210-1 <strong>linux 5.9.14.arch1-1</strong> linux-api-headers 5.8-1 util-linux 2.36.1-4 util-linux-libs 2.36.1-4
As you can see, I have only one Linux Kernel in my Arch Linux system and its version is 5.9.14.
3. Find Installed Linux Kernels in Debian, Ubuntu, Linux Mint, Pop!_OS
In Debian and other Debian-based systems like Ubuntu, Pop!_OS, Linux Mint, we can find the list of all installed Kernels using dpkg command:
$ dpkg --list | grep linux-image
Sample Output:
ii linux-image-5.19.0-42-generic 5.19.0-42.43~22.04.1 amd64 Signed kernel image generic ii linux-image-5.19.0-45-generic 5.19.0-45.46~22.04.1 amd64 Signed kernel image generic ii linux-image-generic-hwe-22.04 5.19.0.45.46~22.04.20 amd64 Generic Linux kernel image
4. View installed Kernels in Fedora, CentOS, RHEL, AlmaLinux, Rocky Linux
To view all installed kernels in RPM-based systems like Fedora, CentOS, RHEL, and RHEL-clones such as AlmaLinux, you can use the rpm command as shown below:
$ rpm -qa kernel
Or,
$ rpm -qa | grep -i kernel
Sample Output from Fedora 33:
kernel-core-5.8.15-301.fc33.x86_64
Sample Output from AlmaLinux 8.3:
5. List All Installed Linux Kernels in openSUSE
The command to list all installed Linux kernels in openSUSE, being an RPM-based system like Fedora and RHEL distributions, is the same:
$ rpm -qa | grep -i kernel
Bonus tip - View only Current Kernel Details
To view the currently running Kernel, you can use one of the following commands:
$ uname -r 5.4.0-65-generic
Or,
$ uname -rs Linux 5.4.0-65-generic
Or,
$ uname -mrs Linux 5.4.0-65-generic x86_64
Now, you know the list of installed Kernels on your Linux system. How would you find when a specific Linux Kernel version is last booted? That's easy! Refer the following guide to check when a Linux kernel last used or booted on.
- Find When A Specific Linux Kernel Version Is Last Booted
Conclusion
In this guide, we have explored various methods to retrieve the list of installed kernels on different Linux distributions. Checking the installed Linux kernels on your system is essential for managing and maintaining a stable and up-to-date operating environment.
By being aware of the installed kernels and their versions, you can ensure that your system is up-to-date with the latest security patches and performance improvements.
Related Read:
- How To Remove Old Unused Linux Kernels
- Display Linux Kernel Module Information With Modinfo Command
- Find out the Linux distribution name, version and Kernel details
- How To Find Linux System Details Using inxi
- Neofetch – Display Linux system Information In Terminal
- Find Linux System Details Using Python
- How To Find Hardware And Software Specifications In Ubuntu
以上がコマンドラインからインストールされているすべてのLinuxカーネルをリストまたは確認する方法の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

ホットAIツール

Undress AI Tool
脱衣画像を無料で

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Clothoff.io
AI衣類リムーバー

Video Face Swap
完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

人気の記事

ホットツール

メモ帳++7.3.1
使いやすく無料のコードエディター

SublimeText3 中国語版
中国語版、とても使いやすい

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

ドリームウィーバー CS6
ビジュアル Web 開発ツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

Linuxシステムの情報とバージョンを知りたい場合は、次の手順を使用できます。1。LSB_RELEASE-Aを使用して、配布情報を表示します。 2。 /etc /os-releaseファイルを表示して、バージョンの詳細を取得します。 3. uname-rまたはuname-mrsを使用して、カーネルバージョンとシステムアーキテクチャを確認します。 4.ハードウェア情報を取得するには、LSCPU、Free-H、またはDMIDECODE(ルートアクセス許可が必要)を実行します。上記の方法はさまざまな分布に適用でき、一部のコマンドにはインストールまたは許可調整が必要になる場合があります。

cronisusedusedusedusedusedusedulingonalways-ossystems、whileanacronuresuressuressursunsystystemstature n't continuouslylypowered、suthaslaptops;

Linuxにソフトウェアをインストールする主な方法は3つあります。1。apt、dnf、またはpacmanなどのパッケージマネージャーを使用し、Sudoaptinintallcurlなどのソースを更新した後にインストールコマンドを実行します。 2。.DEBまたは.RPMファイルの場合、DPKGまたはRPMコマンドを使用してインストールし、必要に応じて依存関係を修復します。 3. SnapまたはFlatpakを使用して、バージョンの更新を追求しているユーザーに適したSudosnapInstallソフトウェア名など、プラットフォームにアプリケーションをインストールします。より良い互換性とパフォーマンスのために、システム独自のパッケージマネージャーを使用することをお勧めします。

choosepop!_os、ubuntu、nobaralinux、orarchlinuxforoptimalgamingminimaloverhead.2.installofficialnvidiaproprietarydriversfornvidiagpus、suseup to-datemesaandkernelverversionsionsionsionsionsipuspuspus

Linuxは古いハードウェアに適しており、セキュリティが高く、カスタマイズ可能ですが、ソフトウェアの互換性が弱いです。 Windowsソフトウェアはリッチで使いやすいですが、リソースの利用率が高くなっています。 1。パフォーマンスの観点から、Linuxは軽量で効率的で、古いデバイスに適しています。 Windowsには高いハードウェア要件があります。 2。ソフトウェアの観点から、Windowsにはより広い互換性、特にプロフェッショナルなツールやゲームがあります。 Linuxは、ツールを使用してソフトウェアを実行する必要があります。 3。セキュリティの観点から、Linux Permission Managementはより厳しく、更新は便利です。 Windowsは保護されていますが、まだ攻撃に対して脆弱です。 4。使用が難しいという点では、Linux学習曲線は急です。 Windows操作は直感的です。要件に従って選択します。パフォーマンスとセキュリティを備えたLinuxを選択し、互換性と使いやすさのWindowsを選択します。

gitをインストール:サーバーのパッケージマネージャーからgitをインストールし、バージョンを確認します。 2。専用のgitユーザーを作成する:adduserを使用してGitユーザーを作成し、オプションでシェルアクセスを制限します。 3.開発者SSHアクセスを構成:GITユーザーに.SSHディレクトリと承認_Keysファイルを設定し、開発者の公開キーを追加します。 4.ベアリポジトリを作成する:サーバー上のベアリポジトリを初期化し、正しい所有権を設定します。 5.クライアントのクローニングとプッシュ:開発者は、SSHを介してリポジトリをクローニングし、変更を送信し、コードを正常にプッシュしてプライベートGitサーバーの構築を完了します。

raidimprovesstorageperformanceandreliability onlinuxserversurough configurations; raid0offersspeedbutnoredancy; raid1providesmirroringforcriticaldatawith50�pacityloss;
