Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk6 min

How to change default kernel in Ubuntu 22.04

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Ubuntu 22.04 boots Linux kernels via GRUB, so “changing the default kernel” usually means telling GRUB which kernel menu entry should be selected on the next boot. You’ll typically do this by setting a persistent default in /etc/default/grub or using GRUB’s saved-entry mechanism.

The safest approach is to use GRUB saved defaults (with grub-set-default) because it survives updates better than hard-coded indexes. Below are three practical methods, plus verification and troubleshooting.

As an Amazon Associate I earn from qualifying purchases.

Why changing the default kernel matters on Ubuntu 22.04

Newer kernels can improve hardware support (Wi‑Fi chipsets, storage controllers, GPUs) and fix regressions, while older kernels can be more stable for specific workloads. When you manage multiple kernels on one machine, choosing the right default prevents slow boot-to-login cycles while you test.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Prerequisites and safety checks

  • Confirm you can reboot and access GRUB (you’ll need this if the new kernel misbehaves).
  • Make sure you still have at least one known-good kernel installed so you can fall back.
  • If your system uses Secure Boot, be prepared for unsigned kernel modules or kernel signing requirements (covered below).

Also, don’t remove old kernels until you’ve confirmed the new one works for your hardware and workload.

Find which kernels are installed

List installed kernel packages first. Ubuntu stores kernel versions in package names like linux-image-5.15.0-xx-generic.

  1. Run:

dpkg --list 'linux-image-*' | grep -E 'linux-image-(unsigned-)?[0-9]'

You can also see which kernel(s) are currently available in GRUB:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Run:

ls -1 /boot | grep -E '^vmlinuz-'

Look for versions like vmlinuz-5.15.0-xx-generic and note the corresponding menu entry text you’ll need later.

Method 1: Set the default kernel using GRUB saved entries (most reliable)

This method uses GRUB’s saved default feature. You set the default menu entry once, then GRUB remembers it across reboots and typically behaves better when GRUB config updates add or reorder entries.

Step 1: Enable GRUB saved default

Edit /etc/default/grub and ensure these lines are set:

sudo nano /etc/default/grub

Set:

GRUB_DEFAULT=saved

and make sure:

GRUB_SAVEDEFAULT=true

If those variables don’t exist, add them. Save and exit.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 2: List GRUB menu entries and choose the target

GRUB menu labels must match what GRUB generated. Use one of these approaches:

  • Check installed menu entries from GRUB’s config:

grep -R --line-number 'menuentry ' /boot/grub/grub.cfg | head -n 50

This is a blunt tool, so the most accurate way is to extract the menuentry titles:

awk -F'"' '/menuentry /{print $2}' /boot/grub/grub.cfg | sed '/^$/d' | head -n 50

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Find the entry that corresponds to the kernel you want, for example:

Ubuntu, with Linux 5.15.0-73-generic

Step 3: Set the default entry with grub-set-default

Now set the saved default to that menu label.

Example (replace the text with your exact GRUB menu entry):

sudo grub-set-default 'Ubuntu, with Linux 5.15.0-73-generic'

If grub-set-default is missing, install GRUB utilities:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

sudo apt update && sudo apt install grub-common

Step 4: Reboot and verify

Reboot:

sudo reboot

After login, verify your running kernel:

uname -r

You should see the version you selected (for example, 5.15.0-73-generic).

Method 2: Hard-code GRUB_DEFAULT in /etc/default/grub

This method works too, but it’s more fragile because GRUB menu ordering can change when kernels are installed or removed.

Step 1: Edit GRUB_DEFAULT

Edit:

sudo nano /etc/default/grub

You have two common choices for GRUB_DEFAULT:

  • By numeric index (0-based):

GRUB_DEFAULT=1

Where 1 means “second menu entry.”

  • By exact submenu and entry (string syntax):

GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 5.15.0-73-generic"

Use the exact text GRUB uses, including the > separators. You can confirm labels by inspecting /boot/grub/grub.cfg.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 2: Update GRUB

After changing /etc/default/grub, regenerate the GRUB config:

sudo update-grub

Step 3: Reboot and confirm

Reboot, then check uname -r again.

Method 3: One-time boot to a different kernel (no permanent default change)

If you only want to test another kernel once, you can boot it without changing GRUB’s default permanently.

Use the GRUB menu at startup

  1. Reboot the PC.
  2. Hold Shift (often) or repeatedly press Esc to bring up the GRUB menu.
  3. Select Advanced options for Ubuntu.
  4. Pick the kernel entry you want (e.g., Ubuntu, with Linux 5.15.0-73-generic).

After you confirm it boots and works, use Method 1 or 2 if you want it as the permanent default.

Installing a different kernel (if you don’t already have it)

If your target kernel isn’t installed yet, you’ll need to add it first. The steps differ depending on whether you’re sticking to Ubuntu’s repository kernels or using Mainline builds.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Option A: Install from Ubuntu repositories

Ubuntu 22.04 ships with GA and HWE kernel streams. To install a specific generic kernel package, you can list available packages:

apt-cache search 'linux-image-.*-generic' | grep -E '5\.(15|19|10)\.' | head -n 20

Then install (example):

sudo apt install linux-image-5.15.0-73-generic linux-headers-5.15.0-73-generic

Rebuild GRUB afterward:

sudo update-grub

Option B: Install a Mainline kernel (Ubuntu Mainline builds)

Mainline kernels can be useful for newer drivers, but you should treat them as “test kernels.” The typical flow is: download the .deb packages for your Ubuntu release, install them, then update GRUB.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Go to the Ubuntu Mainline Builds page and download the kernel packages for your system.
  2. Install the downloaded .deb files (examples vary based on filenames):

sudo apt install ./linux-headers- ./linux-image-

Then run:

sudo update-grub

Secure Boot gotchas

If Secure Boot is enabled, unsigned kernels and out-of-tree modules may fail to load. On Ubuntu, modules are often built and enrolled or signed appropriately when using Ubuntu-provided kernels, but Mainline kernels and some third-party drivers can trigger problems.

  • If you install a Mainline kernel and modules won’t load, check for Secure Boot status and kernel module signing expectations.
  • If your system won’t boot after switching, use GRUB’s one-time menu selection to return to a known-good kernel, then adjust Secure Boot/module strategy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting when the default kernel change doesn’t work

Most “it didn’t change” issues boil down to (1) GRUB didn’t regenerate config, (2) you targeted the wrong menu label, or (3) you’re still on the old kernel because the selected entry wasn’t installed correctly.

Kernel installed but GRUB won’t show it

  • Run sudo update-grub.
  • Confirm the kernel file exists:

ls -1 /boot/vmlinuz-* | grep '5.15.0-73'

  • If the files exist but the entry still doesn’t appear, check /etc/default/grub for unusual settings and re-run update-grub.

Wrong entry name or GRUB_DEFAULT syntax errors

If you used Method 2 with string syntax, even a small mismatch breaks the selection. Recheck menuentry titles in /boot/grub/grub.cfg.

For Method 1, ensure the label passed to grub-set-default exactly matches GRUB’s menu entry text.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

GRUB keeps reverting after update

If you hard-coded GRUB_DEFAULT, GRUB might change the menu layout after kernel updates. Switch to Method 1 (saved default) for better persistence.

System boots, but you’re still on the old kernel

Verify what kernel you’re actually running:

uname -r

Then compare with what’s installed:

ls -1 /boot/vmlinuz-* | sort | tail -n 10

If you selected an entry for a kernel that isn’t installed (or didn’t install fully), reinstall the kernel package and update GRUB again.

Fallback if the new kernel won’t boot

Use the GRUB menu at boot (Method 3). Select the previous “known-good” kernel (often the older generic version). Once you’re stable

Once you’re stable again, you can decide whether to remove the problematic kernel later, or keep it as a fallback while you troubleshoot the issue. Don’t delete the working kernel right away—give yourself at least a reboot or two on the known-good option.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Comparison: which method should you use?

  • Use Method 1 (GRUB saved default + grub-set-default) if you want the change to stick reliably across kernel updates. This is the best “set it once and forget it” option.
  • Use Method 2 (hard-code GRUB_DEFAULT) if you’re comfortable matching exact menu labels or you only need a short-term change. It can break when GRUB’s menu entries shift.
  • Use Method 3 (one-time boot) when you’re testing a new kernel and aren’t sure you want it as the default yet.

If you’re doing kernel testing for hardware support or driver fixes, Method 3 first, then Method 1 once you’ve confirmed everything works, tends to be the smoothest workflow.

Bottom Line

Changing the default kernel on Ubuntu 22.04 is mainly about telling GRUB which menu entry to choose next boot. The most dependable route is enabling GRUB’s saved default and setting your target entry with grub-set-default, then verifying with uname -r.

As long as you keep a known-good kernel installed and have a way to reach the GRUB menu, you can safely iterate—test a newer kernel, promote it to the default when it behaves, and avoid being stuck with an unbootable default.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.