确定安装的内核版本
有多种方法可以确定 Linux 系统上安装的内核版本。以下说明涵盖了最常见的方法:
1,通过 SSH 或直接登录计算实例。
2,运行以下命令之一显示内核版本:
-
uname -r: 只输出一行内核版本。
-
hostnamectl: 输出系统详细信息的有序列表,包括内核版本。只能在有 systemd 的发行版(Debian、Ubuntu、CentOS、openSUSE 等)上使用。
-
cat /proc/version: 输出包含内核版本和发行版详细信息的字符串。
内核版本应该是一个类似于 5.4.0-80-generic 的字符串。在本例中,内核以 generic 结尾,这在 Ubuntu 系统中很常见,表示这是一个上游内核。如果内核以类似于 linode123 结尾,则表示使用的是 Linode 内核,且字符串与精确的 Linode 内核版本一致。
| Determine Which Kernel Is Installed There are may ways you can determine which kernel version is installed on your Linux system. The following instructions cover the most common methods: 1. Log in to the Compute Instance through either SSH or directly. 2. Run one of the following commands to display the kernel version: * uname -r: Outputs a single line with just the kernel version. * hostnamectl: Outputs an organized list of system details, including the kernel version. Can only be used on distributions with systemd (Debian, Ubuntu, CentOS, openSUSE, and more). * cat /proc/version: Outputs a string that contains the kernel version and release details. The kernel version should be a string that’s similar to 5.4.0-80-generic. In this example, the kernel ends with generic, which is common in Ubuntu systems to designate that this is an upstream kernel. If the kernel ends with something similar to linode123, a Linode kernel is being used and the string matches the precise Linode kernel release. |
参考:
https://www.linode.com/docs/products/compute/compute-instances/guides/manage-the-kernel/