up:: [[Computing MOC]]
tags:: #note/develop #on/computing
# Switching OS Remotely when Multi-Booting (UEFI)
When using a multi-boot machine, it is possible to easily switch between operating systems. This note describes the process of doing the switch from within the OS rather than using the default bootloader interface. This is useful when you are physically away from the machine and are connecting remotely.
> [!NOTE] NOTE
> This process is specifically for UEFI systems and is a one-off process. It does not change the default boot order; rather, it overrides the default order one time and forces the bootloader to use the specified boot entry for the next boot only.
## Selecting a Boot Entry
You can set the `BootNext` EFI variable to choose which operating system the device will use on its next boot. Reboot the machine after setting the variable and it will boot into the selected OS.
Below is a list of the commands used to set the variable and reboot.
| Command (Linux) | Command (Windows) | Description |
| ---------------------------- | -------------------------------------------- | -------------------------------------------- |
| `efibootmgr` | `bcdedit /enum firmware` | List the available boot entries and options. |
| `efibootmgr --bootnext NUM` | `bcdedit /set {fwbootmgr} bootsequence GUID` | Set the `BootNext` variable. |
| `reboot`, `systemctl reboot` | `shutdown /r /t 0` | Reboot the machine. |
For example, if GRUB is the default entry (and boots into Linux) but you want to select Windows Boot Manager just once, you can do:
```
# efibootmgr
BootCurrent: 0001
BootOrder: 0001,0000
Boot0000* Windows Boot Manager
Boot0001* Ubuntu
Boot001F USB HDD
# efibootmgr --bootnext 0000
# reboot
```
## Resources
grawity. “Answer to ‘How to switch OS in Dual Boot from remote?’” Super User, May 23, 2023. [https://superuser.com/a/1785545](https://superuser.com/a/1785545).
---
> [!createdat] Created at: [[2025-12-17]]