Skip to content

Instantly share code, notes, and snippets.

@coconut49
Last active August 29, 2015 14:27
Show Gist options
  • Save coconut49/513c22a040d460ab6244 to your computer and use it in GitHub Desktop.
Save coconut49/513c22a040d460ab6244 to your computer and use it in GitHub Desktop.
自动清除其他内核,安装新的3.13-46内核,为锐速,for ubuntu 14.04 LTS
#!/bin/bash
str=`ls /boot/ | grep initrd.img|cut -c 12-`
arr=(${str// / })
cmd="apt-get remove "
for i in ${arr[@]}
do
echo "Found Linux: "$i
cmd=${cmd}"linux-image-"${i}" "
done
eval $cmd
apt-get install linux-image-3.13.0-46-generic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment