Skip to content

Instantly share code, notes, and snippets.

@siddhpant
Created December 9, 2023 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siddhpant/b9ee0f4c5cecd7846d13830fa5bb418d to your computer and use it in GitHub Desktop.
Save siddhpant/b9ee0f4c5cecd7846d13830fa5bb418d to your computer and use it in GitHub Desktop.
Grub Reboot and Shutdown menu entry
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
submenu "Reboot / Shutdown" --class restart {
menuentry "Reboot" --class restart {
reboot
}
menuentry "Shutdown" --class shutdown {
halt
}
}
@siddhpant
Copy link
Author

siddhpant commented Dec 9, 2023

sudo vim /etc/grub.d/40_custom and paste the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment