Skip to main content

Cross-platform boot OS selector for Linux, Windows, and macOS

Project description

OS Flip 🌀

A multi-platform script to view and switch your default boot OS across Linux, Windows, and macOS.


✨ Overview

OS Flip is a cross-platform Python utility to manage boot preferences on dual-boot or multi-boot systems. It allows you to:

  • 🔍 View all bootable OS entries
  • ✅ Set a default OS for future boots
  • 🔁 Temporarily reboot into another OS (“Flip”)

It works on:

  • 🐧 Linux (GRUB-based)
  • 🪟 Windows (bcdedit)
  • 🍎 macOS (bless) – ⚠️ experimental and not fully tested

Whether you're switching between Linux and Windows or managing a Boot Camp setup, OS Flip offers a simple, colorful terminal UI to handle it.


⚙️ Features

  • 🧠 Auto-detects operating system
  • 🔍 Lists all available boot entries
  • ✅ Sets permanent default OS
  • 🔁 Flips (reboots) temporarily into another OS
  • 📁 Logs activity to platform-specific log file
  • 💬 Color-coded terminal messages
  • 🖥️ Launches in a new terminal window (if needed)

📦 Requirements

🐧 Linux:

  • Python 3
  • GRUB2 bootloader
  • update-grub or grub2-mkconfig
  • os-prober
  • Run with sudo or as root

🪟 Windows:

  • Python 3
  • Run as Administrator
  • bcdedit (pre-installed on Windows)

🍎 macOS (experimental):

  • Python 3
  • diskutil, systemsetup, bless
  • Run with sudo

✅ Install Python dependency:

pip install colorama

🚀 Usage

Run the script with elevated privileges:

On Linux/macOS:

sudo python3 os_flip.py

On Windows:

Run Command Prompt or PowerShell as Administrator, then:

python os_flip.py

🧪 Example Output

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

         Welcome to OS FLIP 
                         By - AK (Linux)

ℹ️  Backed up GRUB config to /etc/default/grub.bak.1753056275  
✅ os-prober enabled.  
ℹ️  Updating GRUB entries... done

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

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

📂 Log Files

Activity is logged to a file based on your OS:

  • Linux/macOS: /tmp/os_flip_<username>.log
  • Windows: %TEMP%\os_flip_<username>.log

Useful for debugging or audit trails.


📌 Notes

  • Linux: Edits /etc/default/grub, then runs update-grub or grub2-mkconfig
  • macOS: Uses bless to set the startup disk (requires SIP-safe paths)
  • Windows: Uses bcdedit to read/set boot configuration
  • The script auto-launches in a new terminal if not already interactive
  • GRUB backup is created before changes (/etc/default/grub.bak.<timestamp>)

🧪 Tested Platforms

OS Status
Ubuntu ✅ Confirmed
Fedora ✅ Confirmed
Windows 10/11 ✅ Confirmed
macOS (Intel) ⚠️ Experimental

🛑 Disclaimer

Use at your own risk. Modifying bootloader settings can affect system startup. Ensure you understand the implications, especially on production or encrypted systems.


👨‍💻 Author

AKgithub.com/AKris15


📜 License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

os_flip-1.0.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

os_flip-1.0.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file os_flip-1.0.0.tar.gz.

File metadata

  • Download URL: os_flip-1.0.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for os_flip-1.0.0.tar.gz
Algorithm Hash digest
SHA256 de5de04d1aa9dc67f6c84ae87a413bb0656c7bdbec574d8d77025e487dbb546c
MD5 d569b908c45e64911b98f44e28343b72
BLAKE2b-256 e9937564463218a76ef6bd7108cab5597a52af609577738d724bd9c6feee4f1e

See more details on using hashes here.

File details

Details for the file os_flip-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: os_flip-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for os_flip-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d379a5e25c112499346f1a7b78b521ef03816ef8b412edf1bf93cca519920e66
MD5 2f0eaa9f9add7cda4eea910e82e53761
BLAKE2b-256 6b84e25d5307668f19f975cb1a77aad6dc756673479e1c2bebfbde8754347d71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page