The most common way to boot into recovery mode is via the GRUB bootloader menu:
Reboot your system.
Hold or repeatedly press the Shift key (on BIOS systems) or Esc (on UEFI systems) immediately after the BIOS/UEFI splash screen to bring up the GRUB menu.
In the GRUB menu, use the arrow keys to select the entry that says something like:
code
Ubuntu, with Linux <version> (recovery mode)
Press Enter to boot into recovery mode.
2. From the Shell (Terminal) – Rebooting into Recovery Mode
You cannot directly switch to recovery mode from a running shell without rebooting, but you can instruct GRUB to boot into recovery mode on the next reboot.
Method A: Using grub-reboot
List available menu entries:
bash
grep menuentry /boot/grub/grub.cfg
Look for the line that includes recovery mode. It will look something like:
code
menuentry 'Ubuntu, with Linux 5.15.0-25-generic (recovery mode)' ...
Set GRUB to boot into recovery mode on next reboot:
bash
sudo grub-reboot "1>2"
sudo reboot
Replace "1>2" with the correct menu entry number or string.
Alternatively, you can use the full menu entry name (in single quotes), e.g.:
bash
sudo grub-reboot 'Ubuntu, with Linux 5.15.0-25-generic (recovery mode)'
sudo reboot
Method B: Editing GRUB at Boot
If you missed the GRUB menu, you can reboot and follow the standard method above.
3. Summary Table
Method
Steps
GRUB Menu
Reboot, hold Shift/Esc, select recovery mode, press Enter
Recovery mode is a special boot option that loads a minimal environment for troubleshooting.
If you need to run a root shell, recovery mode provides that option in its menu.
If you need help finding the exact menu entry for grub-reboot, paste the output of grep menuentry /boot/grub/grub.cfg here and I can help you pick the right one!