Skip to main content

OS-Flip 🌀

A Linux terminal tool to view, set, and flip your default boot OS.


✨ Overview

OS Flip is a Python-based utility to manage boot preferences on Linux systems using GRUB2. Whether you're running a dual-boot setup or switching between multiple Linux distributions, OS Flip gives you a simple terminal UI to:

  • 🔍 View bootable OS entries
  • ✅ Set the default OS
  • 🔁 Temporarily flip into another OS for one-time boot

🖥️ Platforms Supported

  • 🐧 Linux only (GRUB2-based bootloaders)

Windows and macOS are not supported. Windows does not allow GRUB changes, and macOS/Boot Camp setups are incompatible. Any Linux distribution should manage BIOS/UEFI defaults through firmware settings.


⚙️ Features

  • 🧠 Auto-detects current OS
  • 📜 Lists all GRUB boot entries
  • ✅ Set permanent default boot entry
  • 🔁 Flip OS temporarily (one-time boot)
  • 📁 Logs activity to a Linux-specific log file

📦 Installation

Requires root/sudo

sudo pip install os-flip

Then run:

sudo os-flip

Requires Python 3.6+


📋 Requirements

  • Python 3
  • GRUB2 bootloader
  • os-prober, update-grub or grub2-mkconfig
  • sudo or root privileges

🚀 Example Output

   ____   _____          ______ _      _____ _____ 
  / __ \ / ____|        |  ____| |    |_   _|  __ \
 | |  | | (___    ___   | |__  | |      | | | |__) |
 | |  | |\___ \         |  __| | |      | | |  ___/ 
 | |__| |____) |        | |    | |____ _| |_| |     
  \____/|_____/         |_|    |______|_____|_|   

         Welcome to OS FLIP 
                         By - AK (Your OS)

📜 Available Boot Entries:
  1. Fedora Linux (Current Default)
  2. Windows Boot Manager (on /dev/nvme0n1p1)

⚙️  Options:
  1. Set default boot OS
  2. Flip OS
  3. Exit

📝 Custom Shortcuts (Advanced)

1. Using a Text File

You can automate OS Flip actions using a simple text file shortcut. For example, create a text file named win_boot.txt containing:

2
1
y

Meaning:

  • 2 → Choose Flip OS
  • 1 → Select OS option 1 (e.g., Windows Boot Manager) for one-time boot
  • y → Confirm and reboot immediately

Run it with:

sudo os-flip < win_boot.txt

2. Create a Quick Command (Alias)

To make this even faster, add a shortcut to your shell configuration file (~/.bashrc, ~/.zshrc, etc.):

alias flip='sudo os-flip < /path/to/win_boot.txt'

After saving and reloading your shell (source ~/.bashrc), just type:

flip

…and your system will instantly flip and reboot into the selected OS.


📂 Log Location

OS Log File Path
Linux /tmp/os_flip_<username>.log

🚧 Disclaimer

⚠️ Use at your own risk. Editing bootloader configs may prevent systems from booting. Always back up and know what you're changing.


👨‍💻 Author

Made with ❤️ by AK MIT Licensed — attribution appreciated!


Metadata

Release files for os-flip 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for os-flip 1.0.5
File Size Uploaded
os_flip-1.0.5.tar.gz 11.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for os-flip 1.0.5
File Interpreter ABI Platform
os_flip-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 22.4 kB

Release files / os_flip-1.0.5.tar.gz

Download URL os_flip-1.0.5.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c0ea6ec041f6bcd8b12fdc112cb9e860f90c9d0949f44b100f19109e635c382c
BLAKE2b-256 checksum
How to use checksums
055bd32ae284647a8b1dbdf3ca343597c7dcb80ca63b393fdcd4e3aba0cb3e82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / os_flip-1.0.5-py3-none-any.whl

Download URL os_flip-1.0.5-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f83dc54dcb8594217fcf4031a5ea0af7d7524d8dcac3a0e29f811ffbd0b0abfb
BLAKE2b-256 checksum
How to use checksums
ad3c681a596ee89c4f43816b1fea3dab9ec952c4126273da7c4c92201989c384
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page