歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> Ubuntu系統的內核版本管理

Ubuntu系統的內核版本管理

日期:2017/3/3 15:56:34   编辑:關於Linux

1.查看ubuntu版本號:

方法一:

cat /etc/issue

返回結果:

Ubuntu 6.06.2 LTS \n \l

方法二:

sudo lsb_release -a

返回結果:

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 6.06.2 LTS

Release: 6.06

Codename: dapper

方法三:

cat /etc/lsb-release

返回結果:

DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=6.06

DISTRIB_CODENAME=dapper

DISTRIB_DESCRIPTION="Ubuntu 6.06.2 LTS"

2.查看內核版本號:

方法四:

cat /proc/version

返回結果:

Linux version 2.6.15-51-386 (buildd@palmer) (gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)) #1 PREEMPT Tue Oct 23 21:42:16 UTC 2007

方法五:

uname -a

返回結果:

本欄目更多精彩內容:http://www.bianceng.cn/OS/Linux/

Linux jpsiteserver 2.6.15-51-386 #1 PREEMPT Tue Oct 23 21:42:16 UTC 2007 i686 GNU/Linux

方法六:僅僅查看內核版本

uname -r

返回結果:

2.6.15-51-386

3.ubuntu內核版本管理:

1.找出系統已經安裝的內核版本,在終端裡輸入命令:

dpkg --get-selections | grep linux-image

然後會顯示系統中已安裝的內核,例如:

flc@ubuntu:~$ dpkg --get-selections | grep linux-image

linux-image-3.0.0-12-generic install

linux-image-3.0.0-19-generic install

linux-image-3.0.0-20-generic install

linux-image-generic install

dpkg --get-selections [<表達式> ...]把已選中的軟件包列表打印到標准輸出;

grep linux-image 匹配查找;

uname -a查看已安裝的linux內核版。

2.卸載舊的內核版本,在終端裡輸入命令:

sudo apt-get remove linux-image-3.0.0-12-generic linux-image-3.0.0-19-generic

Copyright © Linux教程網 All Rights Reserved