Ubuntu 22.04 Set default boot kernel for grub

From Notes_Wiki

Home > Ubuntu > Ubuntu 22.04 > Set default boot kernel for grub

To set default boot kernel for grub in Ubuntu 22.04 use:

  1. Open /boot/grub/grub.cfg to check which menuentry should be booted by default
    grep menuentry /boot/grub/grub.cfg
  2. For selecting third option from "Advanced options for Ubuntu" submenu, edit /etc/default/grub file and set:
    GRUB_DEFAULT="1>2"
    Here first 1 selects second option - "Advanced options for Ubuntu" from top grub menu. Then 2 selects third option from the subsequent sub-menu
  3. Update grub
    sudo update-grub
  4. Reboot and test


Home > Ubuntu > Ubuntu 22.04 > Set default boot kernel for grub