This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/host/desktop/bin/reboot-to-windows
2022-08-11 09:41:31 -05:00

7 lines
182 B
Bash
Executable file

#!/usr/bin/env sh
next_boot_entry_n="$(efibootmgr | awk 'match($0,/Boot([0-9]+)\*? Windows Boot Manager/,a){print a[1];exit}')"
sudo efibootmgr -n "$next_boot_entry_n"
sudo reboot