Ubuntu 22.04 Set default boot kernel for grub

From Notes_Wiki
Revision as of 03:49, 1 April 2025 by Saurabh (talk | contribs) (Created page with "Home > Ubuntu > Ubuntu 22.04 > Set default boot kernel for grub To set default boot kernel for grub in Ubuntu 22.04 use: # Open /boot/grub/grub.cfg to check which menuentry should be booted by default #:<pre> #:: grep menuentry /boot/grub/grub.cfg #:</pre> # For selecting third option from "Advanced options for Ubuntu" submenu, edit /etc/default/grub file and set: #:<pre> #:: GRUB_DEFAULT="1>2" #:</...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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