| Crates.io | rbtw |
| lib.rs | rbtw |
| version | 2.0.1 |
| created_at | 2023-03-21 00:58:06.418474+00 |
| updated_at | 2025-08-02 21:12:25.461293+00 |
| description | Reboot to a specific OS in a single press |
| homepage | |
| repository | https://github.com/dvdsk/rbtw |
| max_upload_size | |
| id | 815756 |
| size | 76,039 |
A single comment to reboot and start a specific OS without further user interaction (bootloader nor sudo). The next boot after will be to the default OS again. The first run will require you to configure the target OS, the setting is stored inside the executable. A second run will ask for sudo, from then on calling rbtw will instantly reboot tot the configured OS.
Set up a number of commands to restart to different OS's. I have 4 OS's currently installed: a general purpose linux, a linux for gaming, a windows install for gaming and finally an OS for work.
First I ensure I have 4 copies of rbtw with names that make sense to me (you might want to chose these differently).
cp rbtw .local/bin/rbta
cp rbtw .local/bin/rbtg
cp rbtw .local/bin/rbtz
Then I configure each of these:
rbta --set-target abydos
rbtg --set-target gaming
rbtz --set-target zed
rbtw --set-target windows
Now I can restart to my gaming linux by calling rbtg and get a cup of tea
while its restarting :)
You can either download the binary, it should work on any Linux system. Or
install from the source on crates.io, recommended if you have cargo
installed
chmod +x rbtw) and place it somewhere in your path. For example .local/bin or for a system-wide install /usr/bin/rbtw.cargo and crates.io use: cargo install rbtw.For rebooting to windows you can use the shell script:
#!/usr/bin/env bash
bootnext=$(efibootmgr | grep Windows | cut -c 5-8)
sudo efibootmgr --bootnext $bootnext
reboot
This will however, need a sudo password on each run. You can set the SetUID bit for efibootmgr and remove the sudo call to get around this.
For rebooting to a specific linux use a combination of bootctl list and
bootctl set-oneshot. See its help for more.