Skip to content

Instantly share code, notes, and snippets.

@ngmoviedo
Created June 19, 2020 15:52
Show Gist options
  • Save ngmoviedo/41d822abba346bad683e64882b385a49 to your computer and use it in GitHub Desktop.
Save ngmoviedo/41d822abba346bad683e64882b385a49 to your computer and use it in GitHub Desktop.
Script to reboot dual boot system on Windows (or any other installed OS)
#!/bin/bash
# Check user name and ask for password
[ "$UID" -eq 0 ] || exec sudo "$0" "$@"
sudo efibootmgr -n 0003 # Windows is Boot0003
reboot # or maybe suspend to disk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment