-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreboot2os
More file actions
executable file
·24 lines (23 loc) · 782 Bytes
/
Copy pathreboot2os
File metadata and controls
executable file
·24 lines (23 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
#-------------------------------------------------------
#
# A simple command script to reboot into a secondary OS.
# Author: Herman Lundberg
# Date: January 4th 2018
#
# Tips:
# The path to the right command folders might need to be
# included. Mine shell script could not find grub-reboot.
#
# The name of the target operating system can be found
# inside /boot/grub/grub.cfg
#
# By setting the ownership to root and the script only
# executable by root the command can only be run by sudo,
# or likewise, which is needed for grub-reboot. Makes it
# impossible to forget sudo and run the command without
# the boot order changed.
#-------------------------------------------------------
PATH="path/to/commands:/path/to/more/commands"
grub-reboot 'Ubuntu'
reboot