安装内核
执行 apt-cache search linux-generic 找到你需要的内核

执行 sudo apt-get install linux-image-4.11.0-14-generic linux-image-extra-4.11.0-14-generic ,一定要记得名称是这种格式 linux-image-*.*.*-*-generic ,安装完成重启即可, sudo reboot
或者也可以 从ubuntu kernel官方下载该版本kernel 。下载完成以后执行如下命令sudo dpkg -i *.deb
切换内核
cat /boot/grub/grub.cfg
找到以 menuentry 开头的行;如下位置

sudo vim /etc/default/grub
修改GRUB_DEFAULT的值,值为上图的内容,如果包含>则必须加英文的引号。如果我们要切换到Linux 3.16.0-30-generic内核,则修改成
GRUB_DEFAULT=”1>2″
保存,然后输入
sudo update-grub
重启
sudo reboot now

查询系统中装了多少内核
dpkg –get-selections|grep linux
删除多余内核
sudo apt-get purge linux-headers-3.0.0-12 sudo apt-get purge linux-image-3.0.0-12-generic