查看 Kernel 的版本

目前有两种查询方式:
1.在rootfs 里使用命令cat /proc/version查看:

test@ubuntu:~$ cat /proc/version
Linux version 4.4.0-18362-Microsoft ([email protected]) (gcc version 5.4.0 (GCC) ) #476-Microsoft Fri Nov 01 16:53:00 PST 2019

2.从 Linux 的源码中查看 Kernel 的版本号呢:
在内核源码的根目录,使用命令cat Makefile,最上面的内容拼接起来就是Linux的版本号,如:

test@ubuntu:~$ cat Makefile 
VERSION = 4
PATCHLEVEL = 4
SUBLEVEL = 0
EXTRAVERSION = -rc3
NAME = Hurr durr I'ma sheep
//省略余下内容

即内核的版本是4.4.0

猜你喜欢

转载自blog.csdn.net/angelsmiling/article/details/105400175