Skip to content

Instantly share code, notes, and snippets.

@dbfin
dbfin / grub2_options_list.sh
Last active December 24, 2015 02:39
List default grub options
cat /etc/default/grub
@dbfin
dbfin / grub2_options_edit_u.sh
Last active December 24, 2015 02:49
Edit default grub options in Ubuntu
gksudo gedit /etc/default/grub
@dbfin
dbfin / grub2_options_edit_k.sh
Last active December 24, 2015 02:49
Edit default grub options in KDE
kdesu kate /etc/default/grub
@dbfin
dbfin / grub2_options_update_u.sh
Last active December 24, 2015 02:49
Update grub in Ubuntu
sudo update-grub
@dbfin
dbfin / grub2_get_saved_kernel.sh
Last active December 24, 2015 02:49
Get grub saved kernel value
grub2-editenv list | grep '^saved_entry='
@dbfin
dbfin / grub2_list_kernels.sh
Last active December 24, 2015 02:49
List all available kernels
sudo cat /boot/grub2/grub.cfg | grep '^menuentry' | grep -v 'rescue' | sed "s|^\s*menuentry\s*['\"]\([^'\"]\+\)['\"].*$|\1|"
@dbfin
dbfin / grub2_options_update_f.sh
Last active November 29, 2023 11:41
Update grub in Fedora
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
@dbfin
dbfin / grub2_set_saved_kernel.sh
Created September 27, 2013 18:52
Set grub saved kernel value
sudo grub2-set-default "Fedora, with Linux 3.10.10-200.fc19.i686"
@dbfin
dbfin / grub2_get_kernel_update_default.sh
Created September 27, 2013 19:10
Get kernel update default version policy
cat /etc/sysconfig/kernel | grep '^UPDATEDEFAULT='
@dbfin
dbfin / yum_kernels_limit.sh
Created September 27, 2013 19:29
Get the current value of the number of kernels kept.
cat /etc/yum.conf | grep '^installonly_limit='